mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-12-26 10:07:30 +00:00
Prevent changing created_by if the current user is not allowed to access to com_users
This commit is contained in:
parent
fc4267038c
commit
c70b2f70b0
@ -155,6 +155,12 @@ class WeblinksModelWeblink extends JModelAdmin
|
||||
$form->setFieldAttribute('publish_down', 'filter', 'unset');
|
||||
}
|
||||
|
||||
// Don't allow to change the created_by user if not allowed to access com_users.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_users'))
|
||||
{
|
||||
$form->setFieldAttribute('created_by', 'filter', 'unset');
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user