[Pkg-owncloud-commits] [owncloud] 66/103: Fix singe user mode on public.php - take two
David Prévot
taffit at moszumanska.debian.org
Sun May 31 12:32:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.
commit 3be30babf8d96a13fd46b9687ef0c1ba89602a85
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date: Fri Apr 10 11:17:33 2015 +0200
Fix singe user mode on public.php - take two
---
lib/base.php | 6 +++++-
public.php | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/base.php b/lib/base.php
index 1caad9f..5b683ca 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -270,7 +270,7 @@ class OC {
}
}
- public static function checkSingleUserMode() {
+ public static function checkSingleUserMode($lockIfNoUserLoggedIn = false) {
if (!\OC::$server->getSystemConfig()->getValue('singleuser', false)) {
return;
}
@@ -280,6 +280,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 c5c227e..8a43b3e 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');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list