Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Currently the simplesamlphp_auth.settings change when a new role is inserted even though the module's configuration has not changed. This is due to the configuration saving all available roles, rather than only the configured roles.
Proposed resolution
Only save the configured roles in simplesamlphp_auth.settings.allow.default_login_roles, so the module's configuration is unchanged when a new user role is added.
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
None.
API changes
None.
Data model changes
simplesamlphp_auth.settings.allow.default_login_roles now only saves configured roles.
Release notes snippet
simplesamlphp_auth.settings.allow.default_login_roles now only saves configured roles.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3097390-4.patch | 1.28 KB | idebr |
| |||
#4 | interdiff-2-4.txt | 872 bytes | idebr |
Comments
Comment #2
idebr CreditAttribution: idebr at iO commentedAttached patch only saves the configured roles in simplesamlphp_auth.settings.allow.default_login_roles, so the module's configuration is unchanged when a new user role is added.
Before:
After:
Comment #3
BerdirHm, the array_values() does change the structure to not be keyed by the role id anymore.
As far as I see, the only use for that setting does an array_intersect() and only cares about the values, but strictly speaking, it's still a change, in case someone had custom logic for some reason with that setting?
Maybe drop the array_values()? a little bit more verbose then, but should be safe for whatever people did with that setting.
Comment #4
idebr CreditAttribution: idebr at iO commented#3 Dropped the
array_values()
call in order to maintain the current array structure: keyed by role id.Comment #6
BerdirThanks, it's unlikely that a problem would have occurred for someone, but better to be careful.