summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2017-10-11 13:14:56 +0200
committerGeorg Ehrke <developer@georgehrke.com>2017-10-16 13:49:46 +0200
commitb958725f78ade3f116001ee6dd66432bffa41748 (patch)
treecea2e5a7a322335257e4972ca0e81c4a30c507b1 /apps/dav/lib
parent7828cf454e0df86a330380dc0674db780a7abd56 (diff)
downloadnextcloud-server-b958725f78ade3f116001ee6dd66432bffa41748.tar.gz
nextcloud-server-b958725f78ade3f116001ee6dd66432bffa41748.zip
Make it possible to opt out of IMip Plugin for CalDAV
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/Server.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php
index 6f3ab3971ef..bfb67e2e5fe 100644
--- a/apps/dav/lib/Server.php
+++ b/apps/dav/lib/Server.php
@@ -76,6 +76,7 @@ class Server {
$mailer = \OC::$server->getMailer();
$dispatcher = \OC::$server->getEventDispatcher();
$timezone = new TimeFactory();
+ $sendInvitations = \OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes';
$root = new RootCollection();
$this->server = new \OCA\DAV\Connector\Sabre\Server(new CachingTree($root));
@@ -137,7 +138,9 @@ class Server {
$this->server->addPlugin(new \OCA\DAV\CalDAV\Plugin());
$this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
$this->server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin());
- $this->server->addPlugin(new IMipPlugin($mailer, $logger, $timezone));
+ if ($sendInvitations) {
+ $this->server->addPlugin(new IMipPlugin($mailer, $logger, $timezone));
+ }
$this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
$this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
$this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));