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.
This is arguably a bug report, but that's not really that important, so going with the less debatable category...
It is very confusing that core encourages to declare an admin permission - and in fact requires it if you want to get the auto-generated collection route - but the permission provider that ships with this module hardcodes a "administer $entity_type_id" permission.
I think we should support the declared admin permission instead.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3065464-2.patch | 10.27 KB | tstoeckler |
|
Comments
Comment #2
tstoecklerHere's a patch that adds support for the admin permission in
BundleEntityAccessControlHandler
,EntityAccessControlHandlerBase
,EntityPermissionProviderBase
andQueryAccessHandlerBase
.I implemented it in a way that it falls back to the previously generated "administer $entity_type_id" permission if no admin permission is provided. To be honest, I find it a bit strange to generate any admin permission at all if the permission is not declared, but I guess that would break BC at this point.
Comment #4
bojanz CreditAttribution: bojanz at Centarro commentedCommitted.