Skip to content

Commit

Permalink
[BUGFIX] Do not end up in workspace and preview for default requests
Browse files Browse the repository at this point in the history
Default requests won't have a workspace id.
That will lead to TYPO3 defaults -99 id.
That in turn will lead to being in preview mode once a backend user is
provided within context.

We therefore cover the default and turn it into live workspace which
could be the expected default.

Resolves: TYPO3#535
  • Loading branch information
DanielSiepmann committed Jan 30, 2024
1 parent 9750f4a commit 36a137f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
// Init backend user if found in database
$backendUser = GeneralUtility::makeInstance(FrontendBackendUserAuthentication::class);
$backendUser->user = $row;
$backendUser->initializeUserSessionManager();
$backendUser->fetchGroupData();
$workspaceId = $workspaceId ?? 0;
if ($workspaceId !== null) {
// Force backend user into given workspace, can be 0, too.
$backendUser->setTemporaryWorkspace($workspaceId);
Expand Down

0 comments on commit 36a137f

Please sign in to comment.