You are here

function spaces_access_admin in Spaces 7.3

Same name and namespace in other branches
  1. 6.3 spaces.module \spaces_access_admin()
  2. 7 spaces.module \spaces_access_admin()

Access check for administrative access to the current space. An optional set of permissions can be provided to be added as AND conditions to the access check.

Parameters

$account: User account to check access for. Optional.

$space: The space to check access against.

4 calls to spaces_access_admin()
spaces_access_admin_perms in ./spaces.module
Access callback for spaces, with extra permission checking.
spaces_block_view in ./spaces.module
Implements hook_block_view().
spaces_customtext_menu_access in spaces_customtext/spaces_customtext.module
Access callback for custom text.
spaces_og_access_admin in spaces_og/spaces_og.module
Access callback for OG administrative items under node/%. Prevents items from showing up under node types that are not groups.
3 string references to 'spaces_access_admin'
spaces_menu in ./spaces.module
Implements hook_menu().
spaces_menu_alter in ./spaces.module
Implements hook_menu_alter().
spaces_og_menu in spaces_og/spaces_og.module
Implements hook_menu().

File

./spaces.module, line 466

Code

function spaces_access_admin($account = NULL, $space = NULL) {
  $space = isset($space) ? $space : spaces_get_space();
  if ($space) {
    return $space
      ->access_admin($account);
  }
  return user_access('administer site configuration', $account);
}