Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/permissions/permissions_tag_processor.php
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
function PermissionValue($params) | function PermissionValue($params) | ||||
{ | { | ||||
$section_name = $params['section_name']; | $section_name = $params['section_name']; | ||||
$perm_name = $params['perm_name']; | $perm_name = $params['perm_name']; | ||||
$sections_helper = $this->Application->recallObject('SectionsHelper'); | $sections_helper = $this->Application->recallObject('SectionsHelper'); | ||||
/* @var $sections_helper kSectionsHelper */ | /* @var $sections_helper kSectionsHelper */ | ||||
$section_data =& $sections_helper->getSectionData($section_name); | $section_name = $sections_helper->getPermSection($section_name); | ||||
if ($section_data && isset($section_data['perm_prefix'])) { | |||||
// using permission from other prefix | |||||
$section_name = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); | |||||
} | |||||
$permissions_helper = $this->Application->recallObject('PermissionsHelper'); | $permissions_helper = $this->Application->recallObject('PermissionsHelper'); | ||||
/* @var $permissions_helper kPermissionsHelper */ | /* @var $permissions_helper kPermissionsHelper */ | ||||
if (!$permissions_helper->isOldPermission($section_name, $perm_name)) { | if (!$permissions_helper->isOldPermission($section_name, $perm_name)) { | ||||
$perm_name = $section_name.'.'.$perm_name; | $perm_name = $section_name.'.'.$perm_name; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | |||||
return $category_path; | return $category_path; | ||||
} | } | ||||
function PermInputName($params) | function PermInputName($params) | ||||
{ | { | ||||
return $this->Prefix.'['.$this->Application->GetVar('group_id').']['.$this->Application->Parser->GetParam('PermissionName').']['.$params['sub_key'].']'; | return $this->Prefix.'['.$this->Application->GetVar('group_id').']['.$this->Application->Parser->GetParam('PermissionName').']['.$params['sub_key'].']'; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |