function _drupalgap_resource_user_access in DrupalGap 6
Same name and namespace in other branches
- 7.2 drupalgap.resource.inc \_drupalgap_resource_user_access()
- 7 drupalgap.resource.inc \_drupalgap_resource_user_access()
Checks to see if the user has access to a permission.
Return value
boolean Bool indicating whether or not the user has access to the permission.
See also
1 string reference to '_drupalgap_resource_user_access'
- drupalgap_services_resources in ./
drupalgap.services.inc - Defines function signatures for resources available to services.
File
- ./
drupalgap.resource.inc, line 107 - This file implements the DrupalGap service resource call back functions.
Code
function _drupalgap_resource_user_access($data) {
if (!isset($data['permission'])) {
return services_error(t('Missing argument permission.'), 406);
}
return user_access($data['permission']);
}