Skip to content

Instantly share code, notes, and snippets.

@gormus
Created April 5, 2012 19:27
Show Gist options
  • Save gormus/2313439 to your computer and use it in GitHub Desktop.
Save gormus/2313439 to your computer and use it in GitHub Desktop.
<?php
/**
* Disable access to 'Permissions' page.
*
* Even the role has 'administer permissions' enabled, users will not be able to
* access to 'Permissions' page, but be able to use all other functionality
* this permission grants them. i.e. (de-)assigning roles to selected users.
*/
function hook_menu_alter(&$items) {
global $user;
if ($user->uid != 1) {
$items['admin/user/permissions']['access callback'] = FALSE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment