Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-10 12:17:33 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-10 12:17:33 +0300
commita33edcd2f0a74884f284166d80d23ad22b822b64 (patch)
tree2834518634eaad2e46b84c59b0fc02d9df073544
parentf05e19348d21c96455adb305328acc7cbfa0f26a (diff)
Fix singe user mode on public.php - take two
-rw-r--r--lib/base.php6
-rw-r--r--public.php2
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 02b55458f1f..7deaf271e4d 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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');
diff --git a/public.php b/public.php
index 8f3bc8e6ae9..f390166d06e 100644
--- a/public.php
+++ b/public.php
@@ -37,7 +37,7 @@ try {
}
OC::checkMaintenanceMode();
- OC::checkSingleUserMode();
+ OC::checkSingleUserMode(true);
$request = \OC::$server->getRequest();
$pathInfo = $request->getPathInfo();