On Product creation page ( product/add/default ) only show/allow stores to be selected where user has permission to or select user owned stores as default.

Comments

klagler created an issue. See original summary.

klagler’s picture

Issue summary: View changes
drugan’s picture

Sorry, it was wrong issue to post the comment :)

drugan’s picture

bojanz’s picture

This is a duplicate of #2499645: Start using the entity query access API on orders, products and stores, but I'll keep it open for now, for visibility.

We'll need to fix our access handling in the next 2 months.

tormi’s picture

mglaman’s picture

Status: Active » Postponed

Marking postponed because the main issue is in Entity API in core. However, I have written an initial proof of concept here: https://github.com/mglaman/commerce_marketplace. This limits the stores available to reference by access control. The real fix should be upstream, and really not a contributed adjustment.

drugan’s picture

This issue is now fixed on the latest version of #2755529: Product variant bulk creation

If user has no administer commerce_store permission then only those stores displayed on the product form which are owned by this user.

The patch:

https://patch-diff.githubusercontent.com/raw/drupalcommerce/commerce/pul...

waspper’s picture

Another workaround maybe using module "entity_browser", and changing the default form widget to use a browser and an entity reference views display, to query only stores owned by current user.

bojanz’s picture

Status: Postponed » Closed (duplicate)

As #5 said, this got fixed in #2499645: Start using the entity query access API on orders, products and stores and shipped with Commerce 2.10