Make it possible to opt out of IMip Plugin for CalDAV
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
7828cf454e
commit
b958725f78
|
@ -52,6 +52,7 @@ $dispatcher = \OC::$server->getEventDispatcher();
|
|||
$calDavBackend = new CalDavBackend($db, $principalBackend, $userManager, $random, $dispatcher, true);
|
||||
|
||||
$debugging = \OC::$server->getConfig()->getSystemValue('debug', false);
|
||||
$sendInvitations = \OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes';
|
||||
|
||||
// Root nodes
|
||||
$principalCollection = new \Sabre\CalDAV\Principal\Collection($principalBackend);
|
||||
|
@ -84,7 +85,11 @@ if ($debugging) {
|
|||
$server->addPlugin(new \Sabre\DAV\Sync\Plugin());
|
||||
$server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
|
||||
$server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin());
|
||||
$server->addPlugin(new \OCA\DAV\CalDAV\Schedule\IMipPlugin( \OC::$server->getMailer(), \OC::$server->getLogger(), new \OC\AppFramework\Utility\TimeFactory()));
|
||||
|
||||
if ($sendInvitations) {
|
||||
$server->addPlugin(new \OCA\DAV\CalDAV\Schedule\IMipPlugin( \OC::$server->getMailer(), \OC::$server->getLogger(), new \OC\AppFramework\Utility\TimeFactory()));
|
||||
}
|
||||
|
||||
$server->addPlugin(new ExceptionLoggerPlugin('caldav', \OC::$server->getLogger()));
|
||||
|
||||
// And off we go!
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue