Commit Graph

174 Commits

Author SHA1 Message Date
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
Roeland Jago Douma ef4b59d341
More fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:42 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +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
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
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 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
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 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
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 4b4292996f
Test resource and room principal backend to check that they provide metadata
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-08-01 15:05:53 +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
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 9bb13fb05f
Created infrastructure to show circles' shared files
There is a proposal to allow users to filter files shared to circles. This commit is needed to provide the infrastucture for it.

Issue: https://github.com/nextcloud/circles/issues/137

Changes to comply to https://github.com/coletivoEITA/circles/pull/2

Polishing: get files shared to circles in caldav

Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-13 00:31:38 +01:00
Morris Jobke 5cc5107cba
Fix PHPUnit
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-12 18:41:37 +01:00
Brad Rubenstein 1a29239960 IMipPlugin: DRY up - move common test set-up into setUp function
Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2019-02-28 01:46:07 +00:00
Brad Rubenstein 1dbda2604b IMipPlugin: Added unit test for dav.invitation_link_recipients support
Existing tests required modification to correctly mock up the new config
parameter fetch, and to set the RSVP flag for attendees (since the test
was detecting token generation, and we no longer generate tokens when
no RSVP is requested by the client or sent by nextcloud).

Signed-off-by: Brad Rubenstein <brad@wbr.tech>
2019-02-28 01:43:41 +00:00
Roeland Jago Douma 15abcff2a1
Expose subadmin to OCP
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-01-29 20:47:35 +01:00
Thomas Citharel 943d48cb3e
Add command to move a calendar from an user to another
Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Add a basic check for displaynames in case we fail to get calendar from uri and put some sf console styles & refactor a bit

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

basic Tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

add forgotten createNamedParameter()

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-01-16 13:58:33 +01:00
Joas Schilling 99bcc1363e
Fix wrong used type
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-23 12:39:02 +01:00
Georg Ehrke 30d13bb760
cache webcal calendars on server
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-11-07 13:25:14 +01:00
Georg Ehrke 325e366b58
add correct calendar-user-type to resource and room backend
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-10-22 15:48:13 +02:00
Georg Ehrke f5dc7b7f07
move disableFreeBusy check from User principal backend to Scheduling Outbox collection. This allows to keep local delivery of scheduling messages while prohibiting FreeBusy requests
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-10-16 20:27:33 +02:00
Georg Ehrke 83639a9898
remove LogicException, because it's also triggered with legitimate parameters
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-09-05 14:10:26 +02:00
Thomas Müller c05a0b9fa6
Adding test for table schedulingobjects and fixing postgres LOB
(cherry picked from commit afd4ebf0404e8bcd7cba0bec2dce177e97632f8a)

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2018-08-06 13:53:32 +02:00
John Molakvoæ (skjnldsv) 14bc9ffda4
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-19 08:16:59 +02:00
Joas Schilling daed1bed57
Also shorten the name of the invitation tokens
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-12 12:11:11 +02:00
Joas Schilling b7de6d7a24
Shorten resource table names to allow install on oracle again
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-12 11:55:19 +02:00
Georg Ehrke 4aa4e4080c
Include accept / decline links in CalDAV invitation emails
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-06-29 10:44:44 +02:00
Georg Ehrke b832edabbf
apply group restrictions to resources
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2018-06-25 04:58:07 +02:00
Roeland Jago Douma 3ca15255f7
Fix the master unit tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-06-01 13:24:04 +02:00
Roeland Jago Douma f9a64d3e1b
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-27 20:51:36 +02:00
John Molakvoæ (skjnldsv) 720e64ba55
Fixed caldav tests and metadata 2
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-08 17:13:50 +01:00
Joas Schilling bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:25 +01:00
Joas Schilling 870023365c
Fix "Undefined method setExpectedException()"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-24 18:10:16 +01:00
Joas Schilling c3424df1f0
Require PHPUnit 6.5 or higher
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-24 17:23:59 +01:00
Morris Jobke 1ceeab9229
Fix unit tests for CalendarManager
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-12 09:33:52 +01:00
Morris Jobke d98dea1eb1
Merge pull request #6884 from nextcloud/feature/3003/opt_out_of_birthday_calendar
Opt out of birthday calendar
2017-12-12 08:29:26 +01:00
Roeland Jago Douma effde616eb
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-11 16:34:28 +01:00
Thomas Citharel 4c32de22bb
Create activities for (un)publishing calendar events
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-12-11 16:28:40 +01:00
Georg Ehrke ea117bac31
catch errors when parsing calendar data for calendar query requests
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-27 17:14:18 +01:00
Morris Jobke f32fbbca2e
Merge pull request #6840 from nextcloud/feature/5282/calendar_api
Calendar API for apps
2017-11-16 21:10:35 +01:00
Georg Ehrke 072652b2af
show name of organizer in from name of invitation email
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-14 21:23:27 +01:00
Georg Ehrke a87d986041
create a user's birthday calendar right after they requested it
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-11 11:28:34 +01:00
Georg Ehrke d59b3392ab
disallow users to create calendars with reserved names
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-11 02:15:56 +01:00
Georg Ehrke 5068d56fb0
add CalDAV interface that allows users to re-enable their birthday calendar
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-11 02:15:50 +01:00
Georg Ehrke dc34622008
remember when a user deleted their contact birthdays calendar
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-10 23:05:04 +01:00
Georg Ehrke fa416e031b
integrate Dav app with Calendar API
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-09 15:14:58 +01:00
Lukas Reschke b754a2e385
Merge pull request #7042 from nextcloud/bugfix/noid/ensure_unique_uid_for_calendar_objects
ensure uid for calendar objects is unique
2017-11-07 21:55:09 +01:00
Roeland Jago Douma f55732a18f
Merge pull request #7075 from nextcloud/remove-unused-variables
Remove unused variables
2017-11-07 16:18:40 +01:00
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Georg Ehrke 4df08f296b
ensure uid for calendar objects is unique
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-06 14:25:08 +01:00
Morris Jobke 5445b1ff17
Remove unused variables
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 09:43:45 +01:00
Georg Ehrke 43147aeada
fancify invitation emails
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-11-03 11:20:03 +01:00
blizzz b3ff9a2248
Merge pull request #6849 from nextcloud/fix-missing-translation-of-personal-calendar-in-activity
Fix missing translation of "Personal" calendar in activities
2017-10-31 15:05:26 +01:00
Joas Schilling 8ce5adcf70
Merge pull request #6903 from nextcloud/feature/679/remove_valarms_from_read_only_shared_calendars
remove reminders from read-only shared calendars
2017-10-31 09:50:46 +01:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Georg Ehrke 1855204ad9
remove reminders from read-only shared calendars
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-10-22 14:19:29 +02:00
Joas Schilling bdb0265644
Fix missing translation of "Personal" calendar in activities
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-16 18:41:33 +02:00
Joas Schilling dbaad22472
Fix tests with group manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-09 12:57:41 +02:00
Joas Schilling 3b4ab6560b
Check if the user/group exists for dav shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-05 12:48:10 +02:00
Georg Ehrke a1df91da9d
Sabre/VObject returns DateTimeImmutable, not a simple DateTime
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-09-05 13:13:37 +02:00
Georg Ehrke 86f28669fc
don't send invitation emails for past events
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-09-05 13:13:37 +02:00
Morris Jobke ca3c69c8ae Merge pull request #5298 from nextcloud/bugfix/4885/calendar_shares_url_special_char_issue
urldecode group principals in Cal- and CardDAV backend
2017-06-14 23:10:40 -05:00
Morris Jobke ac565cecad Merge pull request #5300 from nextcloud/bugfix/noid/fix_proppatch_requests_to_groupshares
allow users to send PropPatch request when calendar is group-shared with them
2017-06-14 23:00:39 -05:00
Georg Ehrke 35781ae45c
urldecode group principals in Cal- and CardDAV backend
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-06-12 21:01:30 +02:00
Georg Ehrke 0f1d47cdf3
allow users to send PropPatch request when calendar is group-shared with them
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-06-08 09:21:56 +02:00
Georg Ehrke 9563c25c69
allow PropPatch requests to contact_birthdays
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-06-08 08:00:52 +02:00
Georg Ehrke 4b5379309e
fix replacing of 4MB Unicode Chars in cal props table
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-05-21 13:26:46 +02:00
Georg Ehrke 255442f281
fix PROPPATCH requests to read-only shared calendars
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-05-08 12:09:15 +02:00
Georg Ehrke 8d00458b56
unit test custom calendar search
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-28 20:21:36 +02:00
Georg Ehrke c76633bb8a
require at least one param or prop filter element
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-25 18:20:32 +02:00
Georg Ehrke dd424fcb7b
unit test CalDAV Search Plugin
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-25 16:39:17 +02:00
Georg Ehrke c89e057d27
add owner-displayname property to calendars and addressbooks
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-23 11:26:49 +02:00
Roeland Jago Douma e9b00f84b8 Merge pull request #4406 from nextcloud/fix-unit-test-problems
Fix unit test problems
2017-04-21 09:35:01 +02:00
Joas Schilling 73b6cd1061
Fix invalid Dav test
PHP Warning:  Declaration of PublicCalendarTest::testPrivateClassification()
should be compatible with CalendarTest::testPrivateClassification($expectedChildren, $isShared)
in apps/dav/tests/unit/CalDAV/PublicCalendarTest.php on line 29

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 13:54:20 +02:00
Joas Schilling c2d1e6e7ff
Restrict share handling to the owner only
Otherwise group members can remove the share for the complete group,
remove edit permissions and even single user shares for other users.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-20 10:44:11 +02:00
Georg Ehrke c99bdc9eb4
don't remove owner property for public calendars
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-09 21:20:59 +02:00
Lukas Reschke 63288ebc50
Don't list on public calendar endpoints
There is no need to allow listing here.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-05 22:43:05 +02:00
Georg Ehrke b887adf386
allow sharees to edit certain calendar properties for themselves
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-03-27 17:21:57 +02:00
Joas Schilling d8b769bd85
Add a unit test for the broken case
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-02 12:28:56 +01:00
Joas Schilling 2da490bf25
Unit test cleanup
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-02 12:28:56 +01:00
Georg Ehrke 97d3020027
fix shared-as-busy events for owner
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-01-26 12:06:07 +01:00
Joas Schilling a70a081fff
Make sure the used event type and the setting/filter are the same
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-10 12:28:55 +01:00
Roeland Jago Douma 82d76fbe96
Fix TodoTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-16 11:50:50 +01:00
Joas Schilling b4d76b16b4
Add tests for the base provider
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-30 12:04:19 +01:00
Joas Schilling 2854e2f413
Move generic tests into namespace
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-30 11:41:38 +01:00
Joas Schilling de1cb1ec32
Add unit tests for ISetting instances
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-30 10:52:16 +01:00
Joas Schilling 56f45e4960
Add tests for the filters
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-30 10:47:55 +01:00
Joas Schilling 4c0263b78a
Move event and todo parsing to new API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-29 16:27:12 +01:00
Georg Ehrke 3a8c4230be
fix PropPatch requests on calendars
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2016-11-21 22:10:51 +01:00
Lukas Reschke 58ca624b62
Add tests
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-09 11:52:40 +01:00
Roeland Jago Douma 1e6175dfcb
Fix CalendarTest
* Made sure delete from self works again (and is tested)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-04 15:40:59 +01:00
Thomas Müller c778b1bade
Update sabre dav to 3.2 (#26115)
* Update sabre/dav to 3.2.0

* Adjust code to work with sabre/dav 3.2.0 and it's dependencies

* Adding own CalDAV plugin to fix calendar home property

* Test if there is a user logged in when listing files home

* Update sabre version used by integration tests

* Disable unauthenticated DAV access

This is needed to make Sabre 3.2 behave like we did before.
Eventually we should integrate better with the ACL plugin which itself
should implement an auth failure when appropriate.

=====

* Fixed so cherry-pick was succesfull

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-04 13:35:10 +01:00
Joas Schilling 7a0e003ade
Add more tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 15:24:18 +01:00
Joas Schilling 36b656e207
Add tests for triggerCalendarActivity
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-03 14:30:02 +01:00