function spaces_access_admin_perms in Spaces 7
Same name and namespace in other branches
- 6.3 spaces.module \spaces_access_admin_perms()
- 7.3 spaces.module \spaces_access_admin_perms()
Access callback for spaces, with extra permission checking.
2 calls to spaces_access_admin_perms()
- spaces_form_alter in ./
spaces.overrides.inc - Implements hook_form_alter().
- spaces_overrides_form in ./
spaces.admin.inc - Form for managing space override values.
2 string references to 'spaces_access_admin_perms'
- spaces_menu_alter in ./
spaces.module - Implements hook_menu_alter().
- spaces_test_menu in tests/
spaces_test.module - Implements of hook_menu().
File
- ./
spaces.module, line 477
Code
function spaces_access_admin_perms($perms = array(), $account = NULL, $space = NULL) {
$perm_access = TRUE;
if (!empty($perms)) {
foreach ($perms as $perm) {
$perm_access = $perm_access && user_access($perm, $account);
}
}
return $perm_access ? spaces_access_admin($account, $space) : FALSE;
}