summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-02-24 08:52:26 +0100
committerGitHub <noreply@github.com>2017-02-24 08:52:26 +0100
commitb26568133f00771ed92f22fd5d6d45c6e595e8bb (patch)
tree6b3a259ba3bbd6751446a54f5bc58e2db9cff904 /apps
parent97b6c1496e76042e3582941aa7411e455fe9d3b8 (diff)
parent9533f4e5edfded577b67d08f7778a8a1704132f2 (diff)
downloadnextcloud-server-b26568133f00771ed92f22fd5d6d45c6e595e8bb.tar.gz
nextcloud-server-b26568133f00771ed92f22fd5d6d45c6e595e8bb.zip
Merge pull request #3605 from nextcloud/single-user
Clean up single user mode
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/MaintenancePlugin.php3
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php18
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();
}