function spaces_access_admin_perms in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces.module \spaces_access_admin_perms()
- 7 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 - Implementation of 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 - Implementation of hook_menu_alter().
- spaces_test_menu in tests/
spaces_test.module
File
- ./
spaces.module, line 472
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;
}