Skip to content

Commit

Permalink
[4.0] Latests/Popular Admin modules permissions (#36559)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman authored Jan 8, 2022
1 parent 67460fa commit 2445d7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion administrator/modules/mod_latest/src/Helper/LatestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public static function getList(Registry &$params, ArticlesModel $model)
{
$item->link = '';

if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
if ($user->authorise('core.edit', 'com_content.article.' . $item->id)
|| ($user->authorise('core.edit.own', 'com_content.article.' . $item->id) && ($userId === $item->created_by)))
{
$item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public static function getList(Registry &$params, ArticlesModel $model)
{
$item->link = '';

if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
if ($user->authorise('core.edit', 'com_content.article.' . $item->id)
|| ($user->authorise('core.edit.own', 'com_content.article.' . $item->id) && ($userId === $item->created_by)))
{
$item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
}
Expand Down

0 comments on commit 2445d7d

Please sign in to comment.