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.
Problem/Motivation
\Drupal\user\PermissionHandler::buildPermissionsYaml()
Will override the provider for permissions if it has been set by the permission callback.
Proposed resolution
Set the provider only if not already explicitly set.
Remaining tasks
User interface changes
n/a
API changes
Adds the ability to set the provider for a permission.
Data model changes
none
Comment | File | Size | Author |
---|---|---|---|
#4 | 2673726_4.patch | 4 KB | Jaesin |
#4 | 2673726.4-test-only.patch | 2.97 KB | Jaesin |
#4 | 2673726_1-4.interdiff.txt | 3.65 KB | Jaesin |
Comments
Comment #2
Jaesin CreditAttribution: Jaesin at Chapter Three commentedSee here for the use case for this:
It's adds a permission provider handler for custom content entities.
Comment #3
dawehnerWFM. Nice small fix
We have some nice little unit test coverage already,
\Drupal\Tests\user\Unit\PermissionHandlerTest
should be easy.Comment #4
Jaesin CreditAttribution: Jaesin at Chapter Three commentedThis allows yaml provided permissions to proxy permissions for other modules as well.
Comment #5
dawehnerNice one!
Comment #7
dawehnerComment #8
catchComment #9
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!
Comment #12
jibranCan we have a change notice for this? I don't understand this change.