From a7aba07dc13b0942a795a879aed0d5267a5052ba Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Thu, 9 Apr 2015 15:57:27 +0200
Subject: [PATCH] block ocs in single user mode

---
 ocs/v1.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ocs/v1.php b/ocs/v1.php
index 398a128c64..8002ca602e 100644
--- a/ocs/v1.php
+++ b/ocs/v1.php
@@ -27,7 +27,9 @@
 
 require_once '../lib/base.php';
 
-if (\OCP\Util::needUpgrade() || \OC::$server->getSystemConfig()->getValue('maintenance', false)) {
+if (\OCP\Util::needUpgrade()
+	|| \OC::$server->getSystemConfig()->getValue('maintenance', false)
+	|| \OC::$server->getSystemConfig()->getValue('singleuser', false)) {
 	// since the behavior of apps or remotes are unpredictable during
 	// an upgrade, return a 503 directly
 	OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
-- 
GitLab