improve explanation of 'view * products' permission

Created on 16 October 2012, over 12 years ago
Updated 7 July 2025, 5 days ago

This permission is rather confusing, as products don't really have a place where you view them -- because the entity page for a product is its edit form. So you might assume that access to this is controlled by an 'edit foo products' permission.

However, commerce_product_ui_product_uri() does:

  // Otherwise return an admin URI if the user has permission.
  if (commerce_product_access('view', $product)) {

What happens if a user has 'view' but not 'edit' permission? This could do to be explained in the hook_permission() description so devs and builders know what they are granting with this. It also appears to affect views of products via query rewriting.

📌 Task
Status

Closed: won't fix

Version

1.0

Component

Developer experience

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024