function computing_access in Drupal Computing 7.2
Check user permissions
Parameters
$perms mixed: either a string or an array of permissions to check.:
null $account:
Return value
bool: TRUE if the user has all permissions, FALSE otherwise.
1 string reference to 'computing_access'
- computing_services_resources in ./
computing.services.inc - Implements hook_services_resources().
File
- ./
computing.module, line 117
Code
function computing_access($perms, $account = NULL) {
if (is_string($perms)) {
$perms = array(
$perms,
);
}
$return = TRUE;
foreach ($perms as $perm) {
$return = $return && user_access($perm, $account);
if (!$return) {
break;
}
}
return $return;
}