function bat_booking_access in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_booking/bat_booking.module \bat_booking_access()
Determines whether the given user has access to a unit.
Parameters
string $op: The operation being performed. One of 'view', 'update', 'create', 'delete' or just 'edit' (being the same as 'create' or 'update').
BatBooking $booking: Optionally a booking to check access for. If nothing is given, access for all bookings is determined.
object $account: The user to check for. Leave it to NULL to check for the global user.
Return value
bool Whether access is allowed or not.
2 calls to bat_booking_access()
- bat_booking_add_access in modules/
bat_booking/ bat_booking.module - Access callback: Checks whether the user has permission to add a booking.
- bat_booking_edit_form in modules/
bat_booking/ bat_booking.admin.inc - Generates the booking editing form.
2 string references to 'bat_booking_access'
- BatBookingUIController::hook_menu in modules/
bat_booking/ bat_booking.admin.inc - Overrides hook_menu() defaults.
- bat_booking_entity_info in modules/
bat_booking/ bat_booking.module - Implements hook_entity_info().
File
- modules/
bat_booking/ bat_booking.module, line 163
Code
function bat_booking_access($op, $booking = NULL, $account = NULL) {
return bat_entity_access($op, $booking, $account, 'bat_booking');
}