Fix ACP for users without admin.general.canUseAcp
authorTim Düsterhus <timwolla@arcor.de>
Sat, 7 Jul 2012 12:57:49 +0000 (14:57 +0200)
committerTim Düsterhus <timwolla@arcor.de>
Sat, 7 Jul 2012 12:57:49 +0000 (14:57 +0200)
Fixes #552

wcfsetup/install/files/lib/system/WCFACP.class.php

index 6403d764d862b1fb93aa9d3aae543694d875397b..e76450ac4d0ce9f3a19aca2404483be9f461603e 100644 (file)
@@ -40,13 +40,14 @@ class WCFACP extends WCF {
                $this->initTPL();
                $this->initCronjobs();
                $this->initBlacklist();
-               $this->initAuth();
                $this->initCoreObjects();
                
                // prevent application loading during setup
                if (PACKAGE_ID) {
                        $this->initApplications();
                }
+               
+               $this->initAuth();
        }
        
        /**
@@ -56,7 +57,7 @@ class WCFACP extends WCF {
                // this is a work-around since neither RequestHandler
                // nor RouteHandler are populated right now
                $pathInfo = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : '';
-               if (empty($pathInfo) || !preg_match('~^/(ACPCaptcha|Login)/~', $pathInfo)) {
+               if (empty($pathInfo) || !preg_match('~^/(ACPCaptcha|Login|Logout)/~', $pathInfo)) {
                        if (WCF::getUser()->userID == 0) {
                                // build redirect path
                                $application = ApplicationHandler::getInstance()->getActiveApplication();