- π©πͺGermany Anybody Porta Westfalica
Unexpected role changes are a major issue, especially if you do not notice this change. Updating priority.
- πΊπΈUnited States bpizzillo
I am going to jump on the me too boat here, but mine might be a different use case. We are actually seeing any users with the `assign XXX role` permission lose all their roles upon logging in. We do have simplesamlphp_auth, which I believe saves the user on each login.
The only odd thing is, about a year+ ago when we first updated the module, we found if we cleared the cache and regranted users the deleted roles they would keep them for a period of time until they got removed again. We were updating to 9.4 and bumped all modules and could not reproduce in dev, so we only updated what was needed. We found that we needed a certain amount of user traffic logging in before it would remove the roles. I assumed it might have been a memcache issue or something in Simplesamlphp_auth.
- πΊπ¦Ukraine nnevill Lutsk
Patch from #3263782-12: Roles being stripped from users when saved β still works well.
- First commit to issue fork.
- π¬π§United Kingdom scott_euser
Hmm actually neither of these work properly it seems:
- Patch in #12 does not actually allow any changes to be made as it just re-pulls the roles from the user entity ignoring any form submission
- MR
3263782-roles-being-stripped
does not consider cases where there are multiple form modes, so if a form mode for the user does not contain the role field, yet the user has access to the role delegation permission, it removes the roles
So I created
3263782-roles-being-stripped-request-check
which just adds a check that the current presave is triggered by a form that has the role change in the request. If it is missing, the change to roles is skipped and roles are left as is. The checks for what roles the user is allowed to change are untouched. - π¬π§United Kingdom scott_euser
scott_euser β changed the visibility of the branch 3263782-roles-being-stripped to hidden.
- Status changed to Needs review
3 months ago 8:24am 14 August 2024 - π¬π§United Kingdom scott_euser
Hid the other two for now, but feel free to unhide if you disagree. Setting to NR
- π¦πΊAustralia acbramley
Can this and π Roles being stripped from users when saved if user has no access to roles field Needs work be combined? They look like duplicate issues.
- Status changed to Closed: duplicate
about 2 months ago 4:17am 12 September 2024 - π¦πΊAustralia acbramley
Thanks! I think the solution over there is a little cleaner too.