Index: trunk/core/units/permissions/permissions_tag_processor.php =================================================================== diff -u -N -r6093 -r7391 --- trunk/core/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 6093) +++ trunk/core/units/permissions/permissions_tag_processor.php (.../permissions_tag_processor.php) (revision 7391) @@ -32,10 +32,15 @@ function PermissionValue($params) { $section_name = $params['section_name']; - + $perm_name = $params['perm_name']; + $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($section_name); - $perm_name = $params['perm_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'); if (!$permissions_helper->isOldPermission($section_name, $perm_name)) { @@ -49,7 +54,9 @@ { $permissions_helper =& $this->Application->recallObject('PermissionsHelper'); $prefix_parts = explode('-', $this->Prefix, 2); - $permissions_helper->LoadPermissions($this->Application->GetVar('g_id'), 0, 1); + /* @var $permissions_helper kPermissionsHelper */ + + $permissions_helper->LoadPermissions($this->Application->GetVar('g_id'), 0, 1, 'g'); } function LevelIndicator($params) @@ -66,7 +73,7 @@ $module = $this->Application->findModule('Var', $prefix, 'Name'); $perm_live_table = $this->Application->getUnitOption('c-perm', 'TableName'); - $perm_temp_table = $this->Application->GetTempName($perm_live_table); + $perm_temp_table = $this->Application->GetTempName($perm_live_table, 'prefix:'.$this->Prefix); if ($category->GetID() == 0) { $categories = Array(0); @@ -144,6 +151,7 @@ $ret = ''; $block_params = $params; foreach ($this->Application->ModuleInfo as $module_name => $module_data) { + if (!$this->Application->prefixRegistred($module_data['Var']) || !$this->Application->getUnitOption($module_data['Var'], 'CatalogItem')) continue; $params['item_prefix'] = $module_data['Var']; $ret .= $this->Application->ProcessParsedTag('m', 'MyInclude', $params); }