commerce_product_access

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

Checks product access for various operations.

Parameters

$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/commerce_product_handler_field_product_link_delete.inc
Render an element.
commerce_product_handler_field_product_link_edit::render in modules/product/includes/views/handlers/commerce_product_handler_field_product_link_edit.inc
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/commerce_product.translation_handler.inc
Checks whether the current user has access to this product.

Code

modules/product/commerce_product.module, line 588

<?php
function commerce_product_access($op, $product = NULL, $account = NULL) {
  return commerce_entity_access($op, $product, $account, 'commerce_product');
}
?>