Skip to content

Commit

Permalink
[plugin][actionlogs] - fix issue #119 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon authored and mbabker committed Jun 19, 2018
1 parent 1408fa2 commit c78aaef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/system/actionlogs/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,19 @@ public function onContentPrepareForm($form, $data)
'com_users.user',
);

if (!in_array($formName, $allowedFormNames))
{
return true;
}

$canView = false;

if (isset($data->id))
{
$canView = JUser::getInstance($data->id)->authorise('core.admin');
}

if (!in_array($formName, $allowedFormNames) || !$canView)
if (!$canView)
{
return true;
}
Expand Down

0 comments on commit c78aaef

Please sign in to comment.