function _vppr_access_taxonomy in Vocabulary Permissions Per Role 6
VPPR's access callback for taxonomy overview page (main entry point).
Grants access to taxonomy overview page even if $user has access to any of the vocabularies.
1 string reference to '_vppr_access_taxonomy'
- vppr_menu_alter in ./
vppr.module - Implementation of hook_menu_alter().
File
- ./
vppr.module, line 34 - Vocabulary Permissions Per Role
Code
function _vppr_access_taxonomy() {
if (user_access('administer taxonomy')) {
return TRUE;
}
global $user;
$perms = variable_get('vppr_perms', array(
array(),
));
foreach ($perms as $perm) {
$diff = array_intersect(array_keys($perm), array_keys($user->roles));
if (!empty($diff)) {
return TRUE;
}
}
return FALSE;
}