Index: branches/unlabeled/unlabeled-1.3.2/core/install/install_data.sql =================================================================== diff -u -r6940 -r7051 --- branches/unlabeled/unlabeled-1.3.2/core/install/install_data.sql (.../install_data.sql) (revision 6940) +++ branches/unlabeled/unlabeled-1.3.2/core/install/install_data.sql (.../install_data.sql) (revision 7051) @@ -552,4 +552,23 @@ INSERT INTO Permissions VALUES (0, 'LOGIN', 13, 1, 1, 0); INSERT INTO Permissions VALUES (0, 'LOGIN', 11, 1, 1, 0); -INSERT INTO Permissions VALUES (0, 'ADMIN', 11, 1, 1, 0); \ No newline at end of file +INSERT INTO Permissions VALUES (0, 'ADMIN', 11, 1, 1, 0); + +INSERT INTO Permissions VALUES (0, 'in-portal:root.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:system.view', 11, 1, 1, 0); + +INSERT INTO Permissions VALUES (0, 'in-portal:user_list.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:user_list.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:user_list.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:user_list.delete', 11, 1, 1, 0); + +INSERT INTO Permissions VALUES (0, 'in-portal:configure_lang.view', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:configure_lang.add', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:configure_lang.edit', 11, 1, 1, 0); +INSERT INTO Permissions VALUES (0, 'in-portal:configure_lang.delete', 11, 1, 1, 0); + +INSERT INTO Permissions VALUES (0, 'CATEGORY.ADD', 11, 1, 0, 0); +INSERT INTO Permissions VALUES (0, 'CATEGORY.DELETE', 11, 1, 0, 0); +INSERT INTO Permissions VALUES (0, 'CATEGORY.MODIFY', 11, 1, 0, 0); + +INSERT INTO Permissions VALUES (0, 'in-portal:service.view', 11, 1, 1, 0); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl =================================================================== diff -u -r7036 -r7051 --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl (.../admins_list.tpl) (revision 7036) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/users/admins_list.tpl (.../admins_list.tpl) (revision 7051) @@ -19,7 +19,7 @@ } var a_toolbar = new ToolBar(); - a_toolbar.AddButton( new ToolBarButton('proj-base:new_user', '', + a_toolbar.AddButton( new ToolBarButton('proj-base:new_user', '', function() { std_precreate_item('u', 'proj-base/users/admins_edit') } ) ); Index: branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php =================================================================== diff -u -r7036 -r7051 --- branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7036) +++ branches/unlabeled/unlabeled-1.65.4/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 7051) @@ -784,6 +784,8 @@ (isset($params['permissions']) && $params['permissions'])) { $perm_helper =& $this->Application->recallObject('PermissionsHelper'); + /* @var $perm_helper kPermissionsHelper */ + $perm_status = $perm_helper->TagPermissionCheck($params, 'm_RequireLogin'); if (!$perm_status) { list($redirect_template, $redirect_params) = $perm_helper->getPermissionTemplate($params); Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl =================================================================== diff -u --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl (revision 0) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/tools/system_tools.tpl (revision 7051) @@ -0,0 +1,30 @@ + + + + + + + + + + "> + + + : + + + ]" value="Go"> + +   + + + + + + + + + +
+ + \ No newline at end of file Index: branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php =================================================================== diff -u -r7036 -r7051 --- branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 7036) +++ branches/unlabeled/unlabeled-1.27.2/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 7051) @@ -223,6 +223,13 @@ $folder_label = $section_data['label']; ksort($section_data['children'], SORT_NUMERIC); foreach ($section_data['children'] as $priority => $section_name) { + // if only tabs in this section & none of them have permission, then skip section too + $section_data =& $sections_helper->getSectionData($section_name); + if ($section_data && isset($section_data['perm_prefix'])) { + // this section uses other section permissions + $section_name = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); + } + $perm_status = $this->Application->CheckPermission($section_name.'.view', 1); if ($perm_status) { break; @@ -238,8 +245,13 @@ $section_data['label'] = $folder_label; // use folder label in tree $section_data['is_tab'] = 1; } - elseif (!$this->Application->CheckPermission($section_name.'.view', 1)) { - continue; + else { + if ($section_data && isset($section_data['perm_prefix'])) { + // this section uses other section permissions + $section_name = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); + } + + if (!$this->Application->CheckPermission($section_name.'.view', 1)) continue; } $params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0; Index: branches/unlabeled/unlabeled-1.16.16/core/kernel/utility/event.php =================================================================== diff -u -r6105 -r7051 --- branches/unlabeled/unlabeled-1.16.16/core/kernel/utility/event.php (.../event.php) (revision 6105) +++ branches/unlabeled/unlabeled-1.16.16/core/kernel/utility/event.php (.../event.php) (revision 7051) @@ -287,9 +287,20 @@ return $perm_section; } + // 1. get section by current top_prefix $top_prefix = $this->getEventParam('top_prefix'); $section = $this->Application->getUnitOption($top_prefix.'.main', 'PermSection'); + // 2. check if this section has perm_prefix mapping to other prefix + $sections_helper =& $this->Application->recallObject('SectionsHelper'); + /* @var $sections_helper kSectionsHelper */ + + $section_data =& $sections_helper->getSectionData($section); + if ($section_data && isset($section_data['perm_prefix']) && $section_data['perm_prefix'] != $top_prefix) { + $this->setEventParam('top_prefix', $section_data['perm_prefix']); + $section = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); + } + if (!$section) { trigger_error('Permission section not specified for prefix '.$top_prefix.'', E_USER_ERROR); } Fisheye: Tag 7051 refers to a dead (removed) revision in file `branches/unlabeled/unlabeled-1.3.2/kernel/admin_templates/tools/system_tools.tpl'. Fisheye: No comparison available. Pass `N' to diff? Index: branches/unlabeled/unlabeled-1.20.2/core/units/admin/admin_config.php =================================================================== diff -u -r7010 -r7051 --- branches/unlabeled/unlabeled-1.20.2/core/units/admin/admin_config.php (.../admin_config.php) (revision 7010) +++ branches/unlabeled/unlabeled-1.20.2/core/units/admin/admin_config.php (.../admin_config.php) (revision 7051) @@ -5,6 +5,9 @@ 'EventHandlerClass' => Array('class' => 'AdminEventsHandler', 'file' => 'admin_events_handler.php', 'build_event' => 'OnBuild'), 'TagProcessorClass' => Array('class' => 'AdminTagProcessor', 'file' => 'admin_tag_processor.php', 'build_event' => 'OnBuild'), + 'QueryString' => Array( + 1 => 'event', + ), 'TitlePresets' => Array( 'tree_root' => Array('format' => '!la_section_overview!'), @@ -37,7 +40,7 @@ 'parent' => 'in-portal:tools', 'icon' => 'in-portal:conf_general', 'label' => 'la_tab_Service', - 'url' => Array('t' => 'in-portal/tools/system_tools', 'pass' => 'm'), + 'url' => Array('t' => 'tools/system_tools', 'pass' => 'm'), 'permissions' => Array('view'), 'priority' => 10, 'debug_only' => true, Index: branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl =================================================================== diff -u --- branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl (revision 0) +++ branches/unlabeled/unlabeled-1.1.2/core/admin_templates/no_permission.tpl (revision 7051) @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + +
+ + +
+ + + "> + + +
+
No Permission

+ + + Permissions Checked:
+ Template:
+ Redirect From Tag: yes
+ + Section:
+ Event: :
+ Redirect From Tag: no
+

+
+
+ + \ No newline at end of file Index: branches/unlabeled/unlabeled-1.73.2/admin/install/inportal_data.sql =================================================================== diff -u -r7022 -r7051 --- branches/unlabeled/unlabeled-1.73.2/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 7022) +++ branches/unlabeled/unlabeled-1.73.2/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 7051) @@ -17,7 +17,7 @@ INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('LOGIN', 12, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('CATEGORY.VIEW', 11, 1, 0, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:root.view', 11, 1, 1, 0); + INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:site.view', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:browse.view', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:advanced_view.view', 11, 1, 1, 0); @@ -33,10 +33,7 @@ INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configuration_custom.edit', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configuration_custom.delete', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:users.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_list.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_list.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_list.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_list.delete', 11, 1, 1, 0); + INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_list.advanced:ban', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_list.advanced:send_email', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:user_groups.view', 11, 1, 1, 0); @@ -67,7 +64,7 @@ INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:emaillog.delete', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:visits.view', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:visits.delete', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:system.view', 11, 1, 1, 0); + INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_general.view', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_general.edit', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:modules.view', 11, 1, 1, 0); @@ -87,10 +84,7 @@ INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_styles.add', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_styles.edit', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_styles.delete', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.view', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.add', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.edit', 11, 1, 1, 0); -INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.delete', 11, 1, 1, 0); + INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.advanced:set_primary', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.advanced:import', 11, 1, 1, 0); INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId) VALUES ('in-portal:configure_lang.advanced:export', 11, 1, 1, 0);