Wrong permission caching for masqueraded roles

Created on 17 April 2025, 4 months ago

Problem/Motivation

When masquerading from admin to a user with a specific role, permissions get calculated differently then when logging in the user itself.

Steps to reproduce

Step 1

* Login as admin
* Navigate to /admin/people
* Masquerade User with role A via button on the right
* No further masquerading to a user available (button not available), despite the permissions are set correctly for these roles.

Step 2

* Login as User with role A
* Navigate to /admin/people
* Same behaviour as in Step 1 (no furhter masquerading available - button does not exist)

Step 3

* Login as User with role A
* Cache Rebuild
* Navigate to /admin/people
* Masquerading available as button as configured

Proposed resolution

I'm not sure whether the disabled masquerading functionality is by design when one is already a masqueraded user, but the cache for this user never gets invalidated. So the masquerading functionality is broken for logged in users with a "wrong" cache being filled when an admin masqueraded to this user before.

🐛 Bug report
Status

Active

Version

2.0

Component

User interface

Created by

🇦🇹Austria daniel.pernold

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024