You are here

function spaces_access_feature_perms in Spaces 7

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

Access callback for spaces, with extra permission checking.

1 call to spaces_access_feature_perms()
spaces_plugin_access_spaces_feature::access in includes/spaces_plugin_access_spaces_feature.inc
Check access directly.
1 string reference to 'spaces_access_feature_perms'
spaces_plugin_access_spaces_feature::get_access_callback in includes/spaces_plugin_access_spaces_feature.inc
Provide the access check as a callback.

File

./spaces.module, line 532

Code

function spaces_access_feature_perms($op = 'view', $feature, $account = NULL, $space = NULL, $perms = array()) {
  $access = spaces_access_feature($op, $feature, $account, $space);
  if (!empty($perms)) {
    foreach ($perms as $perm) {
      $access = $access && user_access($perm);
    }
  }
  return $access;
}