1. commerce
    1. 7
7 commerce_product_access($op, $product = NULL, $account = NULL)

Checks product access for various operations.


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

$product Optionally a product to check access for or for the create operation the product type. If nothing is given access permissions for all products are returned.

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

▾ 5 functions call commerce_product_access()

commerce_product_handler_field_product_link_delete::render in modules/product/includes/views/handlers/
Render an element.
commerce_product_handler_field_product_link_edit::render in modules/product/includes/views/handlers/
Render an element.
commerce_product_ui_product_add_any_access in modules/product/commerce_product_ui.module
Access callback: determines if the user can create any type of product.
commerce_product_ui_product_uri in modules/product/commerce_product_ui.module
Entity uri callback: points to the edit form of the given product if no other URI is specified.
EntityTranslationCommerceProductHandler::getAccess in modules/product/includes/
Checks whether the current user has access to this product.


modules/product/commerce_product.module, line 588

function commerce_product_access($op, $product = NULL, $account = NULL) {
  return commerce_entity_access($op, $product, $account, 'commerce_product');