Skip to content

Commit 36a137f

Browse files
[BUGFIX] Do not end up in workspace and preview for default requests
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
1 parent 9750f4a commit 36a137f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Resources/Core/Functional/Extensions/json_response/Classes/Middleware/BackendUserHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
5555
// Init backend user if found in database
5656
$backendUser = GeneralUtility::makeInstance(FrontendBackendUserAuthentication::class);
5757
$backendUser->user = $row;
58+
$backendUser->initializeUserSessionManager();
59+
$backendUser->fetchGroupData();
60+
$workspaceId = $workspaceId ?? 0;
5861
if ($workspaceId !== null) {
5962
// Force backend user into given workspace, can be 0, too.
6063
$backendUser->setTemporaryWorkspace($workspaceId);

0 commit comments

Comments
 (0)