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.
We have two permissions that look like the overriding admin permission:
- administer licenses: defined in our yml
- administer commerce_license: provided by Entity API in the permissions handler
The first should be removed, and the entity's admin permission changed to the second.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce_licence-remove_permission-2945067-2-D8.patch | 825 bytes | malaynayak |
Comments
Comment #2
malaynayak CreditAttribution: malaynayak as a volunteer and at TA Digital commentedHi @joachim,
Please review the patch.
Comment #3
emartoni CreditAttribution: emartoni at CI&T commentedWorks for me!
Comment #4
joachim CreditAttribution: joachim as a volunteer commentedThanks for working on this!
However, I'm afraid I was a bit slap-dash in writing the summary -- I didn't think anyone would get to it so quickly!
> - administer commerce_license: provided by Entity API in the permissions handler
I think the permission Entity API provides is of the form 'verb ENTITYTYPE entities' -- you'd need to check the code.
Comment #5
malaynayak CreditAttribution: malaynayak as a volunteer and at TA Digital commentedHi @joachim,
. I have checked the Entity API and it provides the default administer permission in the form of administer {$entity_type_id}. Referring code written in Drupal\entity\EntityPermissionProviderBase class I think, what we have done is correct. Please have a look on below code.
Comment #6
malaynayak CreditAttribution: malaynayak as a volunteer and at TA Digital commentedComment #8
joachim CreditAttribution: joachim at Torchbox commentedYou're absolutely right. Thanks for checking that, and thanks again for the patch.
Committed!
Comment #9
emartoni CreditAttribution: emartoni at CI&T commented