Skip to content

Commit

Permalink
Proper authentication check
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hunziker committed May 12, 2016
1 parent db20f94 commit c25637f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion com_sermonspeaker/site/views/frontendupload/view.html.php
Expand Up @@ -141,7 +141,12 @@ public function display($tpl = null)
}
else
{
$authorised = ($this->user->authorise('core.edit', 'com_sermonspeaker'));
$authorised = ($this->user->authorise('core.edit', 'com_sermonspeaker.category.' . $this->item->catid));

if (!$authorised && ($this->item->created_by == $this->user->id))
{
$authorised = ($this->user->authorise('core.edit.own', 'com_sermonspeaker.category.' . $this->item->catid));
}
}

if ($authorised !== true)
Expand Down

0 comments on commit c25637f

Please sign in to comment.