[TASK] Unify handling of TYPO3_PROCEED_IF_NO_USER
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / BackendModuleRequestHandler.php
index 8a976cb..2221c39 100644 (file)
@@ -82,15 +82,21 @@ class BackendModuleRequestHandler implements \TYPO3\CMS\Core\Core\RequestHandler
         * Execute TYPO3 bootstrap
         */
        protected function boot() {
         * Execute TYPO3 bootstrap
         */
        protected function boot() {
+               // Evaluate the constant for skipping the BE user check for the bootstrap, will be done without the constant at a later point
+               if (defined('TYPO3_PROCEED_IF_NO_USER') && TYPO3_PROCEED_IF_NO_USER) {
+                       $proceedIfNoUserIsLoggedIn = TRUE;
+               } else {
+                       $proceedIfNoUserIsLoggedIn = FALSE;
+               }
+
                $this->bootstrap->checkLockedBackendAndRedirectOrDie()
                        ->checkBackendIpOrDie()
                        ->checkSslBackendAndRedirectIfNeeded()
                        ->checkValidBrowserOrDie()
                $this->bootstrap->checkLockedBackendAndRedirectOrDie()
                        ->checkBackendIpOrDie()
                        ->checkSslBackendAndRedirectIfNeeded()
                        ->checkValidBrowserOrDie()
-                       ->initializeBackendRouter()
                        ->loadExtensionTables(TRUE)
                        ->initializeSpriteManager()
                        ->initializeBackendUser()
                        ->loadExtensionTables(TRUE)
                        ->initializeSpriteManager()
                        ->initializeBackendUser()
-                       ->initializeBackendAuthentication()
+                       ->initializeBackendAuthentication($proceedIfNoUserIsLoggedIn)
                        ->initializeLanguageObject()
                        ->initializeBackendTemplate()
                        ->endOutputBufferingAndCleanPreviousOutput()
                        ->initializeLanguageObject()
                        ->initializeBackendTemplate()
                        ->endOutputBufferingAndCleanPreviousOutput()