You are here

function vppr_access_taxonomy in Vocabulary Permissions Per Role 7

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
Implements hook_menu_alter().

File

./vppr.module, line 36
Vocabulary Permissions Per Role

Code

function vppr_access_taxonomy() {
  if (user_access('administer taxonomy')) {
    return TRUE;
  }
  $perms = array_keys(vppr_permission());
  foreach ($perms as $perm) {
    if (user_access($perm)) {
      return TRUE;
    }
  }
  return FALSE;
}