You are here

function merci_check_content_type_user_permissions in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2

Same name and namespace in other branches
  1. 6.2 includes/api.inc \merci_check_content_type_user_permissions()
  2. 6 merci.module \merci_check_content_type_user_permissions()

Ensures the user has 'edit own [type] content' and 'delete own [type] content' permissions, otherwise they are not allowed to reserve the content type.

Return value

TRUE if the user has access to reserve the content type, FALSE otherwise.

3 calls to merci_check_content_type_user_permissions()
merci_build_reservable_items in includes/api.inc
Builds the list of all currently reservable items, filtered by date.
merci_handler_filter_merci_node_type::get_value_options in handlers/merci_handler_filter_merci_node_type.inc
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
merci_validate_merci_selected_items in includes/api.inc
@file MERCI - Managed Equipment Reservation Checkout and Inventory

File

includes/api.inc, line 646
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_check_content_type_user_permissions($type) {
  return user_access("edit own {$type} content") && user_access("delete own {$type} content");
}