0

I am using Drupal 10 with Commerce 2. I would like to add a user, where the user can only see the products of a single store. For example, let's say there is Store A and Store B. I'd like to be able to create a User A and User B where User A only sees products from Store A and User B only sees products from Store B.

As of right now, the permissions for a certain role only allow me to restrict a user to Delete, Update, Create own/all products. For View products, it's either all or nothing.

This question is similar, but I wasn't able to figure out how the Group module could help. This was also for Drupal 8... I'm thinking maybe with Drupal 10 there's a more trivial answer.

1 Answer 1

0

There is no more trivial answer; Drupal 10 is functionally equivalent to Drupal 8 in many respects. As with any content entity, if you want to control access in a fine-grained fashion, you'll have to use a separate module. Group might do just fine for ya, with some custom code ensuring products are related to groups that correspond to stores. (I haven't looked recently, but modules like Content Access or ACL supporting any content entity type would do the trick, too ... I just can't say if they've abstracted their functionality to this extent yet.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.