You are here

function commerce_product_ui_product_type_update_access in Commerce Core 7

Access callback: determines if the user can edit or delete a product type.

Parameters

$type: The machine-name of the product type to be edited or deleted.

1 string reference to 'commerce_product_ui_product_type_update_access'
commerce_product_ui_menu in modules/product/commerce_product_ui.module
Implements hook_menu().

File

modules/product/commerce_product_ui.module, line 157

Code

function commerce_product_ui_product_type_update_access($type) {
  $product_type = commerce_product_type_load($type);
  if ($product_type['module'] == 'commerce_product_ui') {
    return user_access('administer product types');
  }
  return FALSE;
}