diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-02-22 23:02:31 -0600 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-02-22 23:02:31 -0600 |
commit | 9533f4e5edfded577b67d08f7778a8a1704132f2 (patch) | |
tree | dc3e1741b8e69b0f8be6abf3cf678f499e68bff7 /apps/dav | |
parent | 54317e80c0837cb5efe43086685fc09d6796e1ef (diff) | |
download | nextcloud-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 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/MaintenancePlugin.php | 3 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php | 18 |
2 files changed, 2 insertions, 19 deletions
diff --git a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php index 57284b22445..c305fa63f69 100644 --- a/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php +++ b/apps/dav/lib/Connector/Sabre/MaintenancePlugin.php @@ -78,9 +78,6 @@ class MaintenancePlugin extends ServerPlugin { * @return bool */ public function checkMaintenanceMode() { - if ($this->config->getSystemValue('singleuser', false)) { - throw new ServiceUnavailable('System in single user mode.'); - } if ($this->config->getSystemValue('maintenance', false)) { throw new ServiceUnavailable('System in maintenance mode.'); } diff --git a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php index 56306e87136..43c32299523 100644 --- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php @@ -48,27 +48,13 @@ class MaintenancePluginTest extends TestCase { /** * @expectedException \Sabre\DAV\Exception\ServiceUnavailable - * @expectedExceptionMessage System in single user mode. - */ - public function testSingleUserMode() { - $this->config - ->expects($this->once()) - ->method('getSystemValue') - ->with('singleuser', false) - ->will($this->returnValue(true)); - - $this->maintenancePlugin->checkMaintenanceMode(); - } - - /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable - * @expectedExceptionMessage System in single user mode. + * @expectedExceptionMessage System in maintenance mode. */ public function testMaintenanceMode() { $this->config ->expects($this->exactly(1)) ->method('getSystemValue') - ->will($this->onConsecutiveCalls([false, true])); + ->will($this->returnValue(true)); $this->maintenancePlugin->checkMaintenanceMode(); } |