Skip to content

Commit

Permalink
Update tabs.php
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragteapot committed Jan 31, 2018
1 parent a18aa6b commit 9870906
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions layouts/joomla/form/field/rules/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class="custom-select novalidate"
<td headers="aclactionth<?php echo $group->value; ?>">
<?php $result = array(); ?>
<?php // Get the group, group parent id, and group global config recursive calculated permission for the chosen action. ?>
<?php $inheritedGroupRule = Access::checkGroup((int) $group->value, $action->name, $assetId);
<?php $inheritedGroupRule = Access::checkGroup((int) $group->value, $action->name, $assetId);
$inheritedGroupParentAssetRule = !empty($parentAssetId) ? Access::checkGroup($group->value, $action->name, $parentAssetId) : null;
$inheritedParentGroupRule = !empty($group->parent_id) ? Access::checkGroup($group->parent_id, $action->name, $assetId) : null;

Expand All @@ -193,13 +193,13 @@ class="custom-select novalidate"
if ($inheritedGroupRule === null || $inheritedGroupRule === false)
{
$result['class'] = 'badge badge-danger';
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED_INHERITED');
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED_INHERITED');
}
// If recursive calculated setting is "Allowed". Calculated permission is "Allowed (Inherited)".
else
{
$result['class'] = 'badge badge-success';
$result['text'] = Text::_('JLIB_RULES_ALLOWED_INHERITED');
$result['text'] = Text::_('JLIB_RULES_ALLOWED_INHERITED');
}

// Second part: Overwrite the calculated permissions labels if there is an explicit permission in the current group.
Expand All @@ -220,7 +220,7 @@ class="custom-select novalidate"
else if ($assetRule === true)
{
$result['class'] = 'badge badge-success';
$result['text'] = Text::_('JLIB_RULES_ALLOWED');
$result['text'] = Text::_('JLIB_RULES_ALLOWED');
}

// Third part: Overwrite the calculated permissions labels for special cases.
Expand All @@ -229,7 +229,7 @@ class="custom-select novalidate"
if (empty($group->parent_id) && $isGlobalConfig === true && $assetRule === null)
{
$result['class'] = 'badge badge-danger';
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED_DEFAULT');
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED_DEFAULT');
}

/**
Expand Down

0 comments on commit 9870906

Please sign in to comment.