From b0c7dd40fe59c2e8d89a1218ea89886ff0178f2b Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 5 May 2017 16:03:02 +0200 Subject: [PATCH] Add maintenance mode plugin to new dav endpoint --- apps/dav/lib/Server.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index 9f7761033397..649a8d0f63f9 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -49,6 +49,7 @@ use Sabre\DAV\Auth\Plugin; use OCA\DAV\Connector\Sabre\TagsPlugin; use OCA\DAV\AppInfo\PluginManager; +use OCA\DAV\Connector\Sabre\MaintenancePlugin; class Server { @@ -77,7 +78,9 @@ public function __construct(IRequest $request, $baseUri) { $this->server->httpRequest->setUrl($this->request->getRequestUri()); $this->server->setBaseUri($this->baseUri); - $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig())); + $config = \OC::$server->getConfig(); + $this->server->addPlugin(new MaintenancePlugin($config)); + $this->server->addPlugin(new BlockLegacyClientPlugin($config)); $authPlugin = new Plugin(); $authPlugin->addBackend(new PublicAuth()); $this->server->addPlugin($authPlugin);