You are here

function spaces_admin_access in Spaces 6

Same name and namespace in other branches
  1. 6.2 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. Should only be used when the $may_cache argument of hook_menu() is false.
spaces_og_menu in spaces_og/spaces_og.module
Implementation of hook_menu().

File

./spaces.module, line 1583

Code

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