Issue Bug Under Review

#111458"Missing folder permissions" when switching from Backend Admin user to Editor in Media module

Simon Schaufelberger 11/14/26, 19:33 updated 11/14/26, 21:21

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

  1. Simon Schaufelberger commented <span data-processor="relativetime" data-value="2026-11-14T19:45:30+00:00" > 11/14/26, 19:45 </span>

    How should the issue be fixed? Here are the possible suggestions by AI:

    1. Purge state on user change
      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.
    2. Scope state per backend user
      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>
    3. Server-side fallback only
      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.