You are here

function _drupalgap_resource_user_access in DrupalGap 7.2

Same name and namespace in other branches
  1. 6 drupalgap.resource.inc \_drupalgap_resource_user_access()
  2. 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

user_access()

File

./drupalgap.resource.inc, line 110
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']);
}