-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opt out of IMip CalDAV Plugin #6811
Opt out of IMip CalDAV Plugin #6811
Conversation
bb9c732
to
eeec9de
Compare
to test this:
|
apps/dav/appinfo/v1/caldav.php
Outdated
@@ -52,6 +52,7 @@ | |||
$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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove brackets
apps/dav/js/settings-admin-caldav.js
Outdated
"use strict"; | ||
|
||
$('#caldavSendInvitations').change(function() { | ||
var url = OC.generateUrl('/apps/dav/setSendInvitations'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use OCP.AppConfig.setValue('dav', 'sendInvitations', ...)
Then you can drop your controller as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good hint! Will change that accordingly
apps/dav/lib/Server.php
Outdated
@@ -76,6 +76,7 @@ public function __construct(IRequest $request, $baseUri) { | |||
$mailer = \OC::$server->getMailer(); | |||
$dispatcher = \OC::$server->getEventDispatcher(); | |||
$timezone = new TimeFactory(); | |||
$sendInvitations = (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove brackets
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
eeec9de
to
b958725
Compare
removed brackets and using |
@@ -52,6 +52,7 @@ | |||
$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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this useless variable and put the code directly into the if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't if(\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') { ...
look really weird?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well same goes for this assignment ;)
I tested the latest 13.0 release together with thunderbird lightning and even if the sending of the invitations is disabled on the NC side, TB doesn't ask about sending emails. Only if i disable the line with the schedule plugin ($server->addPlugin(new \OCA\DAV\CalDAV\Schedule\Plugin());) then it works as expected -> TB asks if it should send an invitation to the attendees. Can somebody confirm this? (after doing the change in Server.php you need to use the "reset calendar cache" option in TB). |
This pull-request makes it possible to opt out of the iMip Plugin for CalDAV. If disabled, the server will no longer send out emails to attendees. This was requested by many people.
I already implemented this earlier in #5304, but removed it again because of requested changes concerning the implementation.
In contrast to #5304, this pull-request doesn't use the
config.php
, but stores it in the database.This pull-request adds a new GUI element:

Config method besides GUI: