32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-27 02:12:50 +00:00

Prevent changing created_by if the current user is not allowed to access to com_users

This commit is contained in:
Tuan Pham Ngoc 2021-08-27 10:38:45 +07:00
parent fc4267038c
commit c70b2f70b0

View File

@ -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;
}