You are here

function space_og::access_admin in Spaces 6.3

Same name and namespace in other branches
  1. 7.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 63

Class

space_og
Organic groups integration for Spaces.

Code

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