[BUGFIX] Set BackendUserAspect earlier to make it usable in TSConfig 75/58275/3
authorFrank Naegler <frank.naegler@typo3.org>
Fri, 14 Sep 2018 11:01:41 +0000 (13:01 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 14 Sep 2018 13:57:27 +0000 (15:57 +0200)
This patch fix broken TSConfig condition because of missing backend user aspect.

Resolves: #86229
Releases: master
Change-Id: I6528b5d48a5b5711cad8710d4bfcc6222f9fef9c
Reviewed-on: https://review.typo3.org/58275
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php

index d868567..14cb108 100644 (file)
@@ -60,11 +60,11 @@ class BackendUserAuthenticator implements MiddlewareInterface
         $pathToRoute = $request->getAttribute('routePath', '/login');
 
         Bootstrap::initializeBackendUser();
+        // Register the backend user as aspect
+        $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']);
         // @todo: once this logic is in this method, the redirect URL should be handled as response here
         Bootstrap::initializeBackendAuthentication($this->isLoggedInBackendUserRequired($pathToRoute));
         Bootstrap::initializeLanguageObject();
-        // Register the backend user as aspect
-        $this->setBackendUserAspect(GeneralUtility::makeInstance(Context::class), $GLOBALS['BE_USER']);
 
         return $handler->handle($request);
     }