Fix singe user mode on public.php - take two

This commit is contained in:
Thomas Müller 2015-04-10 11:17:33 +02:00
parent f05e19348d
commit a33edcd2f0
2 changed files with 6 additions and 2 deletions

View File

@ -301,7 +301,7 @@ class OC {
}
}
public static function checkSingleUserMode() {
public static function checkSingleUserMode($lockIfNoUserLoggedIn = false) {
if (!\OC::$server->getSystemConfig()->getValue('singleuser', false)) {
return;
}
@ -311,6 +311,10 @@ class OC {
if ($group->inGroup($user)) {
return;
}
} else {
if(!$lockIfNoUserLoggedIn) {
return;
}
}
// send http status 503
header('HTTP/1.1 503 Service Temporarily Unavailable');

View File

@ -37,7 +37,7 @@ try {
}
OC::checkMaintenanceMode();
OC::checkSingleUserMode();
OC::checkSingleUserMode(true);
$request = \OC::$server->getRequest();
$pathInfo = $request->getPathInfo();