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
Add a new permission assign own roles
to administer the roles for your own account.
Remaining tasks
- Write code
- Add a test
- Add an upgrade path for BC.
Data model changes
* A new permission is added. All users that currently uses one of the permissions provided by the Role Delegation module (assign all roles or assign {role} role) should be able to assign the roles for it's own user for BC.
Comment | File | Size | Author |
---|---|---|---|
#7 | add_a_new_permission-2736047-7.patch | 1.28 KB | Prashant.c |
#2 | add_a_new_permission-2736047-2.patch | 1.28 KB | visabhishek |
Comments
Comment #2
visabhishek CreditAttribution: visabhishek as a volunteer and at Azri Solutions commentedI am providing a patch to add a new permission.
Comment #4
visabhishek CreditAttribution: visabhishek as a volunteer and at Azri Solutions commentedI think we have to update test-cases accordingly.
Comment #5
benjy CreditAttribution: benjy at PreviousNext commentedSo the purpose of this is to prevent users from updating their own account even though they can change roles on other accounts? Seems reasonable to me, will need some new tests and probably an upgrade path as well since that will change the default behaviour.
Comment #6
ckaotikThis does indeed sound sensible. I'd rename the permission into
assign own roles
though, to match the naming core uses :)Comment #7
Prashant.cMaking the change suggested by #6.
Comment #9
cmseasy CreditAttribution: cmseasy commentedIs it possible to make a Drupal 7 version of this patch?
Comment #10
Prashant.c@cmseasy
In my opinion that should be done in separate issue specifically for Drupal 7.
Comment #11
JeroenTas @ckaotik mentioned, the permissions should be renamed to
assign own roles
to match core.Comment #12
JeroenTComment #13
JeroenTI created #3057858: Role Delegation integration which let role_delegation and userprotect work together. Userprotect is a dedicated issue which such behavior, so I would suggest using that module. When that issue gets committed, this feature will no longer be necessary.
Comment #14
JeroenT