You are here

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

Checks order access for various operations.

Parameters

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

object $booking: Optionally an booking to check access for.

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

Return value

bool Boolean indicating if the defined user has access to the booking or not.

4 calls to rooms_booking_access()
rooms_booking_edit_form in modules/rooms_booking/rooms_booking.admin.inc
Form callback: create or edit a booking.
rooms_booking_handler_delete_link_field::render in modules/rooms_booking/views/rooms_booking_handler_delete_link_field.inc
Render the field.
rooms_booking_handler_edit_link_field::render in modules/rooms_booking/views/rooms_booking_handler_edit_link_field.inc
Render the field.
_rooms_booking_add_access in modules/rooms_booking/rooms_booking.module
Access callback: Checks whether the user has permission to add a booking.
2 string references to 'rooms_booking_access'
RoomsBookingUIController::hook_menu in modules/rooms_booking/rooms_booking.admin.inc
Overrides hook_menu() defaults.
rooms_booking_entity_info in modules/rooms_booking/rooms_booking.module
Implements hook_entity_info().

File

modules/rooms_booking/rooms_booking.module, line 582
Manage Bookings - Bookings are tied to a customer profile and possible a Unit ID and Order ID.

Code

function rooms_booking_access($op, $booking = NULL, $account = NULL) {
  return rooms_entity_access($op, $booking, $account, 'rooms_booking');
}