From: Thomas Müller Date: Fri, 10 Apr 2015 09:17:33 +0000 (+0200) Subject: Fix singe user mode on public.php - take two X-Git-Tag: v7.0.6RC1~8^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2c656b0e4c7b4774815ec06c37f22c2bc14d3ead;p=nextcloud-server.git Fix singe user mode on public.php - take two --- diff --git a/lib/base.php b/lib/base.php index 14e2b4fe1ff..1714bd1e5ef 100644 --- a/lib/base.php +++ b/lib/base.php @@ -260,7 +260,7 @@ class OC { } } - public static function checkSingleUserMode() { + public static function checkSingleUserMode($lockIfNoUserLoggedIn = false) { if (!\OCP\Config::getSystemValue('singleuser', false)) { return; } @@ -270,6 +270,10 @@ class OC { if ($group->inGroup($user)) { return; } + } else { + if(!$lockIfNoUserLoggedIn) { + return; + } } // send http status 503 header('HTTP/1.1 503 Service Temporarily Unavailable'); diff --git a/public.php b/public.php index 0e04db66da7..ab6331a377a 100644 --- a/public.php +++ b/public.php @@ -12,7 +12,7 @@ try { } OC::checkMaintenanceMode(); - OC::checkSingleUserMode(); + OC::checkSingleUserMode(true); $pathInfo = OC_Request::getPathInfo(); if (!$pathInfo && !isset($_GET['service'])) { header('HTTP/1.0 404 Not Found');