Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are permissions to duplicate the product type, but is there permission to duplicate product variations ?
If I am an administrator, I can duplicate the variations. But if I am a user and owner of a store, I cannot certify my variations. Why is there no permission to duplicate the variations ?
Comment | File | Size | Author |
---|---|---|---|
Capture d’écran du 2020-01-12 22-58-24.png | 239.28 KB | zenimagine | |
Capture d’écran du 2020-01-12 22-57-49.png | 256.15 KB | zenimagine |
Comments
Comment #2
zenimagine CreditAttribution: zenimagine commentedComment #3
zenimagine CreditAttribution: zenimagine commentedThe only way to duplicate variations for a store owner and give him "Administer products" permission, but I can't give him that high a permission.
It would make sense that a store owner could duplicate his variations with the "[Product variations] Manage Product" permission, but that doesn't work.
Comment #4
czigor CreditAttribution: czigor at Centarro commentedFor me granting the "[Product variations] Manage Default" is enough to duplicate product variations. That's the only product permission my user has. Can you check again?
Comment #5
zenimagine CreditAttribution: zenimagine commented@czigor Yes this is the first thing I tried but it doesn't work. My store owner on a 403 page if he duplicates a variation.
I have the Commerce Marketplace module installed and I have the impression that it breaks a lot in Commerce since version 2.16
https://www.drupal.org/project/commerce_marketplace
It's really a shame that Commerce doesn't include authorizations for store owners.
Comment #6
czigor CreditAttribution: czigor at Centarro commentedCommerce Marketplace does change variation access. Compare
MarketplaceProductVariationAccessControlHandler::checkAccess()
andProductVariationAccessControlHandler::checkAccess()
. So that might be the reason.Can you check this on a clean Drupal Commerce install?
Comment #7
bojanz CreditAttribution: bojanz at Centarro commentedI can confirm that the problem is in Commerce Marketplace.
The access control handler from https://git.drupalcode.org/project/commerce_marketplace/blob/8.x-1.x/src... doesn't extend ProductVariationAccessControlHandler at all, so the "manage" permissions are never used.
Thanks, czigor!
Comment #8
zenimagine CreditAttribution: zenimagine commentedThank you I opened a problem in Commerce Marketplace