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.
I would like to use Role Delegation to allow admins to assign user roles only when creating a user.
Once a user has been assigned a role, I'd like User Protect to trump any Role Delegation settings.
Is there a way to accomplish this with existing tools, whether its User Protect + Role Delegation or another set of modules?
I'd like to accomplish this through config, without implementing hook_form_alter or hook_user_*
If there is not a way, I'll re-categorize as a feature request.
Comment | File | Size | Author |
---|---|---|---|
#3 | interdiff-1984520-2-3.txt | 534 bytes | JeroenT |
#3 | 1984520-3.patch | 1.94 KB | JeroenT |
#2 | 1984520-2.patch | 1.93 KB | JeroenT |
Comments
Comment #1
DarkteK CreditAttribution: DarkteK commentedYes, with this module:
https://www.drupal.org/project/roleassign
:)
Comment #2
JeroenTPatch attached fixes the settings overriden by Role Delegation.
I added the following fixes:
Comment #3
JeroenTRemoved short array syntax so tests will run.
Comment #4
JeroenTD8 version of this patch: #3057858: Role Delegation integration
Comment #5
cmseasy CreditAttribution: cmseasy commentedI am using both modules 'User Role Delegation' and 'Userprotect'. In my case I do not want the override functionality as default.
Please make it optional before commit.With the correct setup in Userprotect I can achieve my needs, no need for an optional setup. The patch is usefull and in my opinion: commitable.
Comment #6
izmeez CreditAttribution: izmeez commented@cmeasy can you change status to RTBC based on your findings?
Comment #7
izmeez CreditAttribution: izmeez commentedThere was a similar patch committed to D8 with comment,
in https://www.drupal.org/project/userprotect/issues/3057858#comment-13125588
Can someone using both modules confirm this is RTBC and ready for commit?
Comment #8
MegaChriz CreditAttribution: MegaChriz commented7.x-1.3 has been released, moving this one to 7.x-1.4.