Skip to content

Commit 3297eff

Browse files
[BUGFIX] Properly initialize backend user for 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. Also we add missing initialization for backend user. Resolves: #535
1 parent ee62a11 commit 3297eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ 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->uc = isset($row['uc']) ? unserialize($row['uc']) : [];
59+
$backendUser->initializeUserSessionManager();
60+
$backendUser->fetchGroupData();
61+
$workspaceId = $workspaceId ?? 0;
5862
if ($workspaceId !== null) {
5963
// Force backend user into given workspace, can be 0, too.
6064
$backendUser->setTemporaryWorkspace($workspaceId);

0 commit comments

Comments
 (0)