You are here

function commerce_order_access in Commerce Core 7

Checks order access for various operations.

Parameters

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

$order: Optionally an order to check access for.

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

11 calls to commerce_order_access()
commerce_cart_order_refresh_form_access in modules/cart/commerce_cart.module
Access callback: determines access to the "Apply pricing rules" local action.
commerce_checkout_complete_form_access in modules/checkout/commerce_checkout.module
Access callback: determines access to the "Simulate checkout completion" local action.
commerce_line_item_access in modules/line_item/commerce_line_item.module
Determines access to perform an operation on a particular line item.
commerce_order_admin_order_view_access in modules/order/commerce_order_ui.module
Menu item access callback: prevent view access to the admin order display for customers who have 'view' access to the order but not administration pages.
commerce_order_commerce_line_item_access in modules/order/commerce_order.module
Implements hook_commerce_line_item_access().

... See full list

3 string references to 'commerce_order_access'
commerce_order_entity_info in modules/order/commerce_order.module
Implements hook_entity_info().
commerce_order_ui_menu in modules/order/commerce_order_ui.module
Implements hook_menu().
commerce_order_views_data in modules/order/includes/views/commerce_order.views.inc
Implements hook_views_data()

File

modules/order/commerce_order.module, line 849
Defines the core Commerce order entity and API functions to manage orders and interact with them.

Code

function commerce_order_access($op, $order = NULL, $account = NULL) {
  return commerce_entity_access($op, $order, $account, 'commerce_order');
}