You are here

function spaces_admin_access in Spaces 6.2

Same name and namespace in other branches
  1. 6 spaces.module \spaces_admin_access()

Menu admin access wrapper.

1 call to spaces_admin_access()
_spaces_og_admin_access in spaces_og/spaces_og.module
Wrapper around spaces_admin_access(). Used to determine menu local task visibility : |
2 string references to 'spaces_admin_access'
spaces_active_space_menu in ./spaces.module
A mild abstraction of hook_menu() items that can be used by implementing modules to embed/graft relevant spaces items into the menu tree.
spaces_og_menu in spaces_og/spaces_og.module
Implementation of hook_menu().

File

./spaces.module, line 1327

Code

function spaces_admin_access($type = NULL, $op = NULL) {
  $return = false;
  $space = spaces_get_space();
  if ($space && $type == $space->type) {
    $return = $space
      ->admin_access();
  }
  if ($op == 'features') {
    return $return && (user_access('administer spaces') || user_access('configure spaces features'));
  }
  return $return;
}