Skip to content

Commit

Permalink
Fix allowEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk committed Sep 2, 2017
1 parent 2ba24eb commit 4ee0e26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions administrator/components/com_fields/controllers/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ protected function allowEdit($data = array(), $key = 'parent_id')
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
$user = JFactory::getUser();

// Check general edit permission first.
if ($user->authorise('core.edit', $this->component))
// Zero record (parent_id:0), return component edit permission by calling parent controller method
if (!$recordId)
{
return true;
return parent::allowEdit($data, $key);
}

// Check edit on the record asset (explicit or inherited)
Expand Down

0 comments on commit 4ee0e26

Please sign in to comment.