#111458"Missing folder permissions" when switching from Backend Admin user to Editor in Media module
Description
Steps to reproduce
- Go to Media module
- Create 2 folders “One”, “Two”
- Create a file mount on folder “Two”
- Create a backend user group and assign that group the file mount
- As Admin user, click on Folder “One”
- Go to User Module and witch to Editor
- Open Media Module
- Missing folder permissions. You have no access to the folder “1:/One/”.
This is because the folder is stored in local storage and loaded after switching the user automatically. This must be avoided.
Reviews 1
History 23
-
Simon Schaufelberger changed description <span data-processor="relativetime" data-value="2026-11-14T19:34:10+00:00" > 11/14/26, 19:34 </span>
-
Simon Schaufelberger commented <span data-processor="relativetime" data-value="2026-11-14T19:45:30+00:00" > 11/14/26, 19:45 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 97667 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-14T21:21:41+00:00" > 11/14/26, 21:21 </span>
How should the issue be fixed? Here are the possible suggestions by AI:
Call ModuleStateStorage.purge() on switch-user/exit-switch-user and when the login page loads, so no module state of another user is reused. Fixes Media and Web modules; the previous selection is lost after switching.
Include the backend user uid in the storage key (t3-module-state-<uid>-media), so each user keeps their own folder/page selection and stale state from another user is never read. Slightly larger change: expose the uid to JavaScript.</uid>
In FileListController, open the first accessible folder instead of showing ‘Missing folder permissions’ when the requested folder is not accessible. Does not clear the stale state or fix the page tree, and hides genuine permission errors.