The commerce product url (e.g. /admin/commerce/products/6) is easily available in rules and is also displayed by default in may other places and users occasionally click on them. You do not want most users to have permission to access the product edit page. I would like a module that redirects all users that do not have permission to view a commerce product page to the product display instead. For my needs each product is only displayed on one node. If the module could be written where if there is more than one display for a product it just redirects to the first display.

In other words if a anonymous user clicks on a product link /admin/commerce/products/6 they are redirected to the product display node node/25

I can put $100 towards this.

Comments

nevets’s picture

From

You do not want most users to have permission to access the product edit page

I am not sure what your concern is since you would need grant edit permission.

What are some examples of where a product link is displayed by default? (I think you can avoid these on the non-admin side).

iwant2fly’s picture

You are correct. Some other module is interfering here and causing the issue I was wanting fixed with a module. Thanks for getting me headed in the right direction. I will close this offer for now until I figure out what I really need.

pintarprogramming’s picture

Do you need a module for this? Could you not just modify theme for this? For example on preprocess function you could check if url is commerce product url and depending on users permissions you would redirect him to product display page if needed.