32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-24 17:40:23 +00:00

Secure created_by like other core components

This commit is contained in:
Tuan Pham Ngoc 2021-08-17 23:24:43 +07:00
parent f6a5e30925
commit b668befbb2

View File

@ -142,6 +142,12 @@ class WeblinkModel extends AdminModel
$form->setFieldAttribute('publish_down', 'filter', 'unset');
}
// Don't allow to change the created_by user if not allowed to access com_users.
if (!Factory::getApplication()->getIdentity()->authorise('core.manage', 'com_users'))
{
$form->setFieldAttribute('created_by', 'filter', 'unset');
}
return $form;
}