You are here

function hook_rooms_entity_access in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Allows modules to deny or provide access for a user to perform a non-view operation on an entity before any other access check occurs.

Modules implementing this hook can return FALSE to provide a blanket prevention for the user to perform the requested operation on the specified entity. If no modules implementing this hook return FALSE but at least one returns TRUE, then the operation will be allowed, even for a user without role based permission to perform the operation.

If no modules return FALSE but none return TRUE either, normal permission based checking will apply.

Parameters

$op: The request operation: update, create, or delete.

$entity: The entity to perform the operation on.

$account: The user account whose access should be determined.

$entity_type: The machine-name of the entity type of the given $entity.

Return value

TRUE or FALSE indicating an explicit denial of permission or a grant in the presence of no other denials; NULL to not affect the access check at all.

1 invocation of hook_rooms_entity_access()
rooms_entity_access in ./rooms.module
Generic access control for Rooms entities.

File

./rooms.api.php, line 36
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_rooms_entity_access($op, $entity, $account, $entity_type) {

  // No example.
}