#111720No backend user can show a workspace preview without the right to change data
Description
Problem
A preview of a workspace must show pages with the rights of one backend user. But the preview must never change data. The core has no backend user for this:
BackendUserAuthenticationcan change records, files and its workspace, and it can log in and write a session.PreviewUserAuthentication(EXT:workspaces) has no user record. It shows every page of the workspace and ignores the rights of the user.
Why
The preview token series for #110664 needs a backend user in the frontend request that has the rights of the user who made the token, stays in one workspace and cannot write.
What the patch adds
An internal class ReadOnlyBackendUserAuthentication (EXT:frontend). It takes one user record and keeps the read rights of the user and its groups. It refuses each change of records, files and caches, each other workspace, a login and a session. Two guards stop the DataHandler and the file storages for this user. No core code uses the class yet. Later patches for #110664 use it.
Reviews 1
Related issues 1
History 13
-
Matthias Vogel changed Related to #110664 12/04/26, 08:26
-
Gerrit Code Review pushed patch set 1 for main to change 98315 status
NewUnder Review 12/04/26, 08:28 -
Gerrit Code Review pushed patch set 2 for main to change 98315 12/04/26, 09:32