You are here

function organigrams_entity_access in Organigrams 7

Access callback for the organigrams entities.

Parameters

string $op: An operation to perform on the organigram. Valid values are view, edit and delete.

object $entity: An organigrams entity on which the operation will be performed.

mixed $account: The account to check, if not given use currently logged in user.

Return value

bool TRUE if the user has permission to perform the operation, otherwise FALSE.

2 calls to organigrams_entity_access()
organigrams_block_view in ./organigrams.module
Implements hook_block_view().
organigrams_view_page in ./organigrams.module
Menu callback to display an organigram.
1 string reference to 'organigrams_entity_access'
organigrams_entity_info in ./organigrams.module
Implements hook_entity_info().

File

./organigrams.module, line 1079
Defines the organigrams functions and entity types.

Code

function organigrams_entity_access($op, $entity, $account = NULL) {

  // Determine whether the given account has access to the entity for the
  // specified operation.
  return organigrams_user_access($op, $entity, $account);
}