Skip to content

Commit

Permalink
Update field.php (#12827)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepereiradasilva authored and rdeutz committed Nov 15, 2016
1 parent 4c8344d commit 2156baf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion administrator/components/com_fields/models/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ public function getForm($data = array(), $loadData = true)
$this->loadTypeForms($form, $data['type'], $component);
}

if (!JFactory::getUser()->authorise('core.edit.state', $context . '.field.' . $jinput->get('id')))
$fieldId = $jinput->get('id');
$parts = explode('.', $context);
$assetKey = $fieldId ? $context . '.field.' . $fieldId : $parts[0];

if (!JFactory::getUser()->authorise('core.edit.state', $assetKey))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled', 'true');
Expand Down

0 comments on commit 2156baf

Please sign in to comment.