You are here

function oauth2_server_client_access in OAuth2 Server 7

Access control for oauth2_server_client entities.

Parameters

string $op: The operation being performed. One of 'view', 'update', 'create' or 'delete'.

object $entity: Optionally an entity to check access for. If no entity is given, it will be determined whether access is allowed for all entities of the given type.

object $account: The user to check for. Leave it to NULL to check for the global user.

string $entity_type: The entity type of the entity to check for.

Return value

bool TRUE if access granted, FALSE otherwise.

See also

entity_access()

1 string reference to 'oauth2_server_client_access'
oauth2_server_entity_info in ./oauth2_server.module
Implements hook_entity_info().

File

./oauth2_server.module, line 552
Provides OAuth2 server functionality.

Code

function oauth2_server_client_access($op, $entity, $account, $entity_type) {
  return user_access('administer oauth2 server', $account);
}