User/group isn't allowed to insert link to article via XTD "Article" button when we want to limit users to edit its own articles.
"Global Configuration/Permissions settings", Edit Own == Allowed, function "Article" (XTD button) rise JERROR_ALERTNOAUTHOR message.
User/group should be allowed to add article link even with core.edit.own set to Allowed not only with core.edit.
User/group are not allowed to add article link with core.edit.own permissions (only, core.edit set to Denied).
Problem is in components\com_content\content.php file
current code:
elseif ($input->get('view') === 'articles' && $input->get('layout') === 'modal')
{
if (!$user->authorise('core.edit', 'com_content'))
{
JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning');
return;
}
}
changed code to:
elseif ($input->get('view') === 'articles' && $input->get('layout') === 'modal')
{
if (!($user->authorise('core.edit', 'com_content') ||
$user->authorise('core.edit.own', 'com_content')))
{
JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning');
return;
}
}
gives wanted result - users/groups with core.edit.own permission only are allowed to insert links
I've tried but failed to do so...
Just make your change to the staging branch
go to https://github.com/joomla/joomla-cms/blob/staging/components/com_content/content.php and press the edit icon (pencil). make the changes, had a commit description, save and submit a PR explaining what you have done and how to test.
Thanks... done :)
#10653
Thanks. Closing as we have a pull request for testing
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-28 12:25:17 |
Closed_By | ⇒ | brianteeman |
please make pr