You are here

function taxonomy_access_role_edit_access in Taxonomy Access Control 7

Access callback: Determines whether the admin form can be accessed.

1 string reference to 'taxonomy_access_role_edit_access'
taxonomy_access_menu in ./taxonomy_access.module
Implements hook_menu().

File

./taxonomy_access.module, line 189
Allows administrators to specify access control for taxonomy categories.

Code

function taxonomy_access_role_edit_access($rid) {

  // Allow access only if the user may administer permissions.
  if (!user_access('administer permissions')) {
    return FALSE;
  }

  // Do not render the form for invalid role IDs.
  $roles = _taxonomy_access_user_roles();
  if (empty($roles[$rid])) {
    return FALSE;
  }

  // If the conditions above are met, grant access.
  return TRUE;
}