summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-22 23:02:31 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-02-22 23:02:31 -0600
commit9533f4e5edfded577b67d08f7778a8a1704132f2 (patch)
treedc3e1741b8e69b0f8be6abf3cf678f499e68bff7 /lib/base.php
parent54317e80c0837cb5efe43086685fc09d6796e1ef (diff)
downloadnextcloud-server-9533f4e5edfded577b67d08f7778a8a1704132f2.tar.gz
nextcloud-server-9533f4e5edfded577b67d08f7778a8a1704132f2.zip
Clean up single user mode
Single user mode basically disables WebDAV, OCS and cron execution. Since we heavily rely on WebDAV and OCS also in the web UI it's basically useless. An admin only sees a broken interface and can't even change any settings nor sees any files. Also sharing is not possible. As this is at least the case since Nextcloud 9 and we haven't received any reports for this it seems that this feature is not used at all so I removed it. The encryption commands now rely on the well tested maintenance mode. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/base.php b/lib/base.php
index 9f480c0b0dc..c63efb359cc 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -286,32 +286,6 @@ class OC {
}
}
- public static function checkSingleUserMode($lockIfNoUserLoggedIn = false) {
- if (!\OC::$server->getSystemConfig()->getValue('singleuser', false)) {
- return;
- }
- $user = OC_User::getUserSession()->getUser();
- if ($user) {
- $group = \OC::$server->getGroupManager()->get('admin');
- if ($group->inGroup($user)) {
- return;
- }
- } else {
- if(!$lockIfNoUserLoggedIn) {
- return;
- }
- }
- // send http status 503
- header('HTTP/1.1 503 Service Temporarily Unavailable');
- header('Status: 503 Service Temporarily Unavailable');
- header('Retry-After: 120');
-
- // render error page
- $template = new OC_Template('', 'singleuser.user', 'guest');
- $template->printPage();
- die();
- }
-
/**
* Checks if the version requires an update and shows
* @param bool $showTemplate Whether an update screen should get shown
@@ -990,7 +964,6 @@ class OC {
OC_App::loadApps(array('filesystem', 'logging'));
OC_App::loadApps();
}
- self::checkSingleUserMode();
OC_Util::setupFS();
OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo());
return;