function secure_permissions_menu_alter in Secure Permissions 7.2
Same name and namespace in other branches
- 6 secure_permissions.module \secure_permissions_menu_alter()
- 7 secure_permissions.module \secure_permissions_menu_alter()
Implements hook_menu_alter().
If required, remove access to the permissions and roles screens.
File
- ./
secure_permissions.module, line 94 - Secure Permissions module file.
Code
function secure_permissions_menu_alter(&$items) {
// Permission administration pages.
$show_roles = secure_permissions_variable('secure_permissions_show_roles_page');
if (!$show_roles) {
$items['admin/people/roles'] = array(
'access callback' => 'secure_permissions_deny_access',
'type' => MENU_CALLBACK,
);
$items['admin/people/roles/edit'] = array(
'access callback' => 'secure_permissions_deny_access',
'type' => MENU_CALLBACK,
);
}
$show_permissions = secure_permissions_variable('secure_permissions_show_permissions_page');
if (!$show_permissions) {
$items['admin/people/permissions'] = array(
'access callback' => 'secure_permissions_deny_access',
'type' => MENU_CALLBACK,
);
}
}