Created
April 5, 2012 19:27
-
-
Save gormus/2313439 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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