Commit Graph

356 Commits

Author SHA1 Message Date
Brad Rubenstein 442af8c5d5 Minor cleanup: php-cs-fixer, tests, interface consistency
IMipPlugin.php Removed blank lines to make php-cs-fixer happy.
Minor cleanup:  bugs found by Psalm static checker
IEMailTemplate: The public interface to addBodyListItem also needs to include the new plainIndent parameter.
IMipPlugin: Fixes an undefined variable for events that do not have DTEND.  Also use explicit string conversion for parameters and properties in several places.

The new email template adds an additional blank line before "button" links in plain text, so the tests were fixed to include that additional blank line.

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2020-09-02 17:54:36 +02:00
Robin Appelman 460db942a0
Update apps/dav/lib/CalDAV/Activity/Setting/CalDAVSetting.php
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
2020-08-26 12:20:46 +00:00
Robin Appelman aadf0f6f87
move calendar settings into their own group
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-25 19:11:28 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
brad2014 b0687b1182 Make icon set for CalDav event presentation, use in iMIP email.
iMIP e-mails were, as a hack, using filetypes icons for caldav
elements (titles, locations).  This commit creates a folder of
caldav element icons. To start, they are used in iMIP emails,
but eventually should be used by any app that wants to have icon
labels for caldav elements.

Signed-off-by: brad2014 <brad2014@users.noreply.github.com>
2020-08-20 22:16:47 +02:00
brad2014 781359a582 iMIP email improvements (take 2)
This PR is a replacement for PR #17195. It is intended to be simpler
to review and approve, with fewer changes, some disabled by default.

It addresses issues #12391 and #13555, with the following changes:

- The plainText of iMIP emails has been upgraded as described in
issue #12391. The HTML design style has not been changed.

- Some of the HTML and plainText content has been rearranged
(simplified header language, moving the event title to from text
body to the first item in the bullet list, spelling corrections,
moving the description to the end of the list), per issue #12391.

- The interface for EMailTemplate has been extended: addBodyListItem
now takes an optional `plainIndent` parameter. Existing callers
see no change. Where new calls set the  new parameter >0, the list
item label (metaInfo) is put in column 1, and the value is indented
into column 2 (properly accounting for multiple lines, if any).

- An optional dav config setting has been added,
`invitation_list_attendees`. It defaults to 'no', leaving emails
unchanged. If set by the site admin to 'yes', then iMIP emails
include, for the organizer and each attendee, their name, email,
and a ✔︎ if they have accepted the invitation.

- Minor refactoring.

Notes:

- The labels for organizers and attendees list items are new, and
require translation/localization.

- Dav config settings are documented in the code, but not in the
Administrator's Guide.

Signed-off-by: brad2014 <brad2014@users.noreply.github.com>
2020-08-20 22:16:47 +02:00
Morris Jobke 4361d65f5f
Merge pull request #22041 from nextcloud/feature/noid/typed_events_dav
Add Typed Events for CalDAV- and CardDAV-related Events
2020-08-19 19:34:12 +02:00
Morris Jobke fedf9c69d9
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 18:16:35 +02:00
Georg Ehrke 67f1ef4658
Add Typed Events for CalDAV- and CardDAV-related Events
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-18 21:40:57 +02:00
Morris Jobke 05df385538
Merge pull request #22236 from nextcloud/bugfix/noid/dav_sharing_backend_canWrite_isOwner
CalDAV: Add ability to limit sharing to owner
2020-08-18 16:48:43 +02:00
Georg Ehrke 14755d85d6
Add ability to limit sharing to owner
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-18 13:18:00 +02:00
Daniel Kesselberg 6f8147b18f
Fix some MissingDocblockType or InvalidDocblock warnings.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-14 15:10:48 +02:00
Christian Weiske ebe7081c2b Remove duplicated SQL addWhere line 2020-08-11 21:35:48 +02:00
Georg Ehrke 900617e7d7
Add Event and Task Backends for Unified Search
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-04 16:01:59 +02:00
Morris Jobke 0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 08:33:17 +02:00
Morris Jobke d78449c01c
Merge pull request #18895 from nextcloud/bugfix/noid/fix_birthday_calendar_color
Changes the Birthday calendar color to slightly brighter one
2020-07-06 13:20:55 +02:00
Joas Schilling db8267db26
Use the new method everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-03 10:59:43 +02:00
Thomas Citharel b61b74e81a
Fix empty event UUID reminder notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-04 11:25:36 +02:00
Morris Jobke ecbc009e2f
Translate the maintenance mode message in webdav
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-05-06 18:11:54 +02:00
Roeland Jago Douma a1f3293c06
Merge pull request #19039 from nextcloud/dav-activity-provide-links-to-calendar
Provide links to calendar in event creation/update activities
2020-04-30 09:10:56 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Thomas Citharel deb2ea9cea
Provide links to calendar in event creation/update activities
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-04-26 11:11:50 +02:00
Joas Schilling 5e402f8aae
Check all remotes for local access
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-14 18:56:06 +02:00
Thomas Citharel ebdf66b706
Provide dav setting for user's default calendar
And add tests to handle schedule-default-calendar-URL

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-04-13 15:07:42 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst 3a415e4139
Remove space between switch case and colon
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:17:53 +02:00
Christoph Wurst 42625a46be
Remove spaces after method or function call
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Thomas Citharel 058ffa37ff
Add default titles for titleless events in invitations
Closes #19662

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-04-03 13:49:25 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Roeland Jago Douma 2200cc8562
Merge pull request #19325 from nextcloud/dependachristoph/composer/sabre-4.0
Update Sabre (and friends) to 4.0
2020-03-30 09:34:25 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Georg Ehrke 5e2c802bb7
Set custom ProdId in Birthday service, do not depend on Sabre Versio number for unit tests
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-03-27 12:53:44 +01:00
Georg Ehrke 52ba75f644
Sabre/DAV 4.0: beforeMethod is now beforeMethod:*
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-03-27 12:53:44 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Roeland Jago Douma 3427653676
Merge pull request #19986 from nextcloud/bugfix/19980/fix_uid_as_uri
RefreshWebcalService: randomly generate calendar-object uri
2020-03-25 08:11:49 +01:00
Christoph Wurst 3e338c9075
Merge pull request #18788 from nextcloud/fix/18782/translate-busy-in-caldav
Translate 'Busy' in CalDAV
2020-03-24 15:12:21 +01:00
Thomas Citharel 42dde6d623
Add check that DateTime parameters are of correct type
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-03-22 14:24:13 +01:00
dartcafe 65c591093e
fix OCA\DAV\CalDAV\CalDavBackend search $options
Signed-off-by: dartcafe <github@dartcafe.de>
2020-03-22 14:24:13 +01:00
Georg Ehrke bd1f98cba3
RefreshWebcalService: randomly generate calendar-object uri
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-03-16 15:36:13 +01:00
Joas Schilling e6206731c7
Merge pull request #19252 from nextcloud/bug/fix-notification-object-id
Hash event UID to make sure it's not too long for PushProvider notifications
2020-02-25 17:04:25 +01:00
Joas Schilling d224ee667e
Correctly trim long cyrillic note
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-25 11:17:02 +01:00
Roeland Jago Douma 713d3d49ad
Merge pull request #19196 from nextcloud/feature/17126/allow_apps_to_register_their_own_calendars
Allow apps to provide Calendars in user's calendarHome
2020-02-23 17:00:03 +01:00
Gary Kim 709e7447ed
Translate 'Busy' in CalDAV
Signed-off-by: Gary Kim <gary@garykim.dev>
2020-02-23 22:38:24 +08:00
Georg Ehrke b46e5cb270
Allow apps to provide Calendars in user's calendarHome
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-02-18 14:35:14 +01:00
Thomas Citharel 8b22b9f046
Move RefreshWebcalJob logic to a proper service so that it may be called
independently

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-02-10 16:04:38 +01:00
Thomas Citharel 41fa057285
Hash event UID to make sure it's not too long for PushProvider
notifications

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-02-01 18:13:51 +01:00
Georg Ehrke 165fc172b1
Fix display of DTEND for multi-day all-day event
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-01-30 15:02:16 +01:00
Georg Ehrke 4d299d1c66
Changes the Birthday calendar color to slightly brighter one
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-01-14 16:48:48 +01:00
Roeland Jago Douma b7f93cc56b
Merge pull request #18115 from nextcloud/bugfix/17951/reminderservice_resource_error
Properly handle resources in ReminderService
2019-12-27 14:42:10 +01:00
Georg Ehrke 0b1b12c8a2
Verify that is an array before accessing it
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-12-09 16:08:13 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 09c1d8c316
Merge pull request #18113 from nextcloud/bugfix/15967/webcal_cache_headers
Add refresh-interval to exported calendars
2019-11-29 09:06:28 +01:00
Georg Ehrke 6d39c6cb50
Set common-name to user's displayname if none is set
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-11-29 07:48:30 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Georg Ehrke fb89bc3931
Add refresh-interval to exported calendars
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-11-27 14:51:17 +01:00
Georg Ehrke 05e47af6b2
Properly handle resources in ReminderService
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-11-26 12:20:35 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma 85610d9b99
Merge pull request #17174 from nextcloud/bugfix/noid/properly_mark_birthday_calendars_as_not_sharable
properly mark birthday calendars as not shareable for now
2019-09-17 18:03:21 +02:00
Georg Ehrke b0a3782a07
properly mark birthday calendars as not shareable for now
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-09-17 12:21:26 +02:00
Georg Ehrke 3487f0d281
Sabre/VObject returns a DateAndOrTime object now, so adapt to it in Birthday service
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-09-16 15:47:42 +02:00
Georg Ehrke 88f6d1c20e
Make push notifications for calendar reminders opt-in
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-09-02 15:18:43 +02:00
Roeland Jago Douma e99fa92456
Merge pull request #16615 from nextcloud/feature/16518/rooms_resources_should_respond
Make rooms / resources automatically reply to invites
2019-08-28 09:34:38 +02:00
Georg Ehrke cc37c39ede
Make rooms / resources automatically reply to invites
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-26 13:27:59 +02:00
Georg Ehrke befe38e1d7
replace coffin with textual description "Death of ..."
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-26 10:36:49 +02:00
Georg Ehrke 6f66fba559
fix foreach error for reminder generator
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-18 20:56:57 +02:00
Georg Ehrke 4d28a4544e
Final fixes
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 20:05:01 +02:00
Georg Ehrke 2d6473e79b
Add repair step to register reminder index for existing events
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 20:03:54 +02:00
Georg Ehrke bcce568c6d
Support recurring events + repeating alarms
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 20:03:51 +02:00
Georg Ehrke 7c4a8a3bdf
Provide a fake AudioProvider that is basically the same as PushProvider, better then not showing reminders at all for now
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 20:02:56 +02:00
Georg Ehrke a6f792616c
Implement getID and getName in Reminder/Notifier as required since Nextcloud 17
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 20:02:56 +02:00
Georg Ehrke 11fa45196e
smaller syntax changes to CalDAV reminder classes
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 20:02:56 +02:00
Thomas Citharel 7bddcc091d
Support event reminders (email and notifications)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-08-15 20:02:56 +02:00
Roeland Jago Douma f452e23a7d
Merge pull request #16666 from nextcloud/feature/calendar/delegation
Feature/calendar/delegation
2019-08-15 19:30:45 +02:00
Georg Ehrke 63d584afb5
use principaluri instead of userid, allowing to add delegates for rooms and things
Signed-off-by: Georg Ehrke <developer@georgehrke.com>

!fixup add owner_id and proxy_id as db index, since we use it for querying

Signed-off-by: Georg Ehrke <developer@georgehrke.com>

!fixup don't add ACL for each individual proxy, just use calendar-proxy groups

Signed-off-by: Georg Ehrke <developer@georgehrke.com>

!fixup allow delegation of resources / rooms

Signed-off-by: Georg Ehrke <developer@georgehrke.com>

!fixup fix addIndex call in migration

Signed-off-by: Georg Ehrke <developer@georgehrke.com>

!fixup fix remaining constructor calls of Principal

Signed-off-by: Georg Ehrke <developer@georgehrke.com>

!fixup minor fixes and unit tests

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-15 15:41:28 +02:00
Roeland Jago Douma 01a4644cad
Use the proxymapper to obtain valid proxy data
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-15 15:41:27 +02:00
Roeland Jago Douma 954290ab5f
Merge pull request #12392 from brad2014/feature/properly-present-buttons-from-imip-mails
Customize presentation of accept/decline buttons in iMip mail
2019-08-15 08:17:30 +02:00
Roeland Jago Douma 22f29d8e54
Add DB mapper and Entity
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-08-14 09:42:24 +02:00
Georg Ehrke ab6add54c7
Allow to do a principal property search based on metadata keys
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-01 19:40:27 +02:00
Georg Ehrke 54fb0f4f04
provide room / resource properties as principal properties
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-01 10:08:56 +02:00
brad2014 8d8bcea1d8 Move dav.invitation_link_recipients from getSystemValue to getAppValue
Per @georgehrke change request for PR #12392, instead of setting
dav.invitation_link_recipients in the system config.php file, we
set it in the database table oc_appconfig.

Furthermore, the value of the config variable is always a string:
'yes' to include links in imip mail, 'no' to exclude them, or a
comma-separated list of email addresses and/or domains for which
they should be included.  If not specified in oc_appconfig, the
default is 'yes'.

Signed-off-by: brad2014 <brad2014@users.noreply.github.com>
2019-07-31 12:55:50 -07:00
Roeland Jago Douma 1ec98af3e0
Merge pull request #16560 from nextcloud/bugfix/noid/fix_cutype_reporting
fix calendar-user-type reporting
2019-07-27 12:23:25 +02:00
Georg Ehrke 6a2a5465cf
fix CUType reporting
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-07-26 15:04:58 +02:00
Georg Ehrke dce1787b9a
allow to provide supported calendar component set internally as a string
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-07-22 16:58:54 +02:00
Georg Ehrke 9f6dd51912
LIMIT is no column but a SQL feature, allow limit on initial sync
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-07-18 12:42:11 +02:00
Roeland Jago Douma 49361c40e2
Typehint builtin types in constructor to not initiate autoloading
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-06-04 15:13:33 +02:00
Georg Ehrke 98a93d5226
Revert "send invitations for shared calendars"
This reverts commit a9c313ce45.
2019-05-22 09:02:25 +02:00
Georg Ehrke d74e49b3e6
implement principal property search for calendar user address set property
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-03-21 16:32:41 +01:00
Vinicius Cubas Brand 5e37b52241
Share calendar to circle
* Allow user to share calendar with a circle
* Allow user to see calendars shared with his/her circles

Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2019-03-01 10:40:54 +01:00
Brad Rubenstein 79d20e4758 Revert 3ff3ed0c56 case-insensitive compares.
My oops.  The comparisons, which are copied from the IMipPlugin shipped with sabre-io/dav,
do not need to be case insensitive because the sender and recipient names are normalized by sabre,
(see calls to getNormalizedValue in voboject/lib/ITip/Broker.php).

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2019-02-28 01:43:07 +00:00
Brad Rubenstein 6421e30b2c Respect RSVP parameter for attendees when adding accept/decline buttons.
If RSVP=TRUE parameter is FALSE or absent for an ATTENDEE, then do no
present accept/decline buttons. The organizer isn't asking for an RSVP.

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2019-02-28 01:42:47 +00:00
Brad Rubenstein 31a25dc6b0 Customize presentation of accept/decline buttons in iMip mail
Fix Issue #11230
Only present accept/decline button links in iMip mail for REQUEST, not CANCEL or others.

Fix Issue #12156
Implement config setting "dav.invitation_link_recipients", to control
which invitation recipients see accept/decline button links.  The
default, for public internet facing servers, is to always include
them.  For a server on a private intranet, this setting can be set
to the email addresses or email domains of users whose browsers can
access the nextcloud server referenced by those accept/decline
button links. It can also be set to "false" to exclude the links
from all requests.

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2019-02-28 01:41:48 +00:00
Morris Jobke 2b76e27aad
Merge pull request #11832 from nextcloud/bugfix/9849/birthday_without_year
set birthday year to 1970 if no year, take X-APPLE-OMIT-YEAR into account
2019-02-20 10:16:47 +01:00
Georg Ehrke 3acde071f3
Add Repair step to regenerate birthday calendar
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-02-16 16:19:22 +01:00