You are here

function space_og::access_admin in Spaces 7.3

Same name and namespace in other branches
  1. 6.3 spaces_og/plugins/space_og.inc \space_og::access_admin()
  2. 7 spaces_og/plugins/space_og.inc \space_og::access_admin()

Override access_admin().

Overrides space_type::access_admin

File

spaces_og/plugins/space_og.inc, line 77

Class

space_og
Organic groups integration for Spaces.

Code

function access_admin($account = NULL) {
  global $user;
  $account = isset($account) ? $account : $user;
  if ($this->og && ($this
    ->og_is_group_admin($this->og, $account) || $this->group->uid === $account->uid)) {
    return TRUE;
  }
  else {
    if (user_access('administer spaces', $account) || user_access('administer group', $account)) {
      return TRUE;
    }
  }
  return parent::access_admin($account);
}