Commit Graph
100 Commits
Author SHA1 Message Date
Andrew McMillan bc5edf09cf Handle the ?after=(duration|date) syntax when receiving a PUT of a calendar. 2013-05-29 12:50:50 +12:00
Andrew McMillan 5200c6d996 Allow adding an 'after=YYYY-MM-DD' or 'after=P72D' parameter
Only applies to PUT of a collection.  This will mean that only events
after that date (or absolute duration prior to today).  All repeating
events will still be included.
2013-05-23 13:37:00 +12:00
Andrew McMillan 8417e59918 Better timezone handling for alarm times. 2012-06-30 16:03:53 +12:00
Andrew McMillan 35a5518971 Catch 'events' without a DTSTART gracefully and ignore them. 2012-06-25 08:02:08 +12:00
Frank Steinberg 0c582b9147 Attendees can only modify own event instance and own PARTSTAT on all attendees' instances. Lookup event upon incoming scheduling messages in ANY calendar, not just the default schedule calendar.
Hi,

this proposed patch does the following:

- When an attendee (not the organizer) modifies an object, these modifications should be applied completely to that user's instance of the object. However, the organizer's and other attendees' instances should not be modified in most aspects: Only the attendee's own PARTSTAT modification should be distributed to the organizer's and other attendees' instances. E.g. modifications on VALARMs or TRANSP settings are individual to that single user that sends the modification.
  However, I have doubts whether the organizer should be able to apply such modifications on all attendees' instances, once they exist for other attendees. Currently, I did not yet change this behavior.

- When a user receives an invitation in his schedule-default-calendar, he might move it to another calendar. When a subsequent modification to the event arrives, another instance (with the same UID!), is created in the schedule-default-calendar. This patch makes the server search for an instance of the event in any of the receiving user's calendar, so that no event duplicates are created.

I am not really familiar with the code as a whole, so that the way I implemented these changes is probably not "correct".

Regards,

 -frank
2012-05-07 09:30:03 +12:00
Andrew McMillan 11cb332603 Make sure we increment the sync-token on PUT / DELETE. 2012-04-11 00:39:07 +12:00
Andrew McMillan a34203a7b8 Sometimes we want the action hook to be post commit.
This adds another hook, and makes log_caldav_action() regular
across both PUT and DELETE (in a transaction), adding post_commit_hook()
as a method with the same signature which is called after the actual
commit, and also matches in both cases.
2012-04-10 23:30:07 +12:00
Andrew McMillan 7a3f2c4744 Make it so that PUT of a calendar collection becomes a synchronisation.
We only write events which differ, and only delete events which aren't
present in the new upload.  If done in append mode then events which
already exist will be updated more cleanly too.
2012-04-06 14:03:55 +12:00
Andrew McMillan 9c7083be24 Fix problems calling import collection from external contexts. 2012-01-30 22:25:03 -08:00
Rob Ostensen 5359e6fb98 ischedule: make invites and replies work 2012-01-31 00:19:45 -06:00
Andrew McMillan 67541c73c2 Handle addressbook import along with calendar import. 2012-01-13 17:42:20 +13:00
Andrew McMillan 91d6a69899 Strip URL-unfriendly characters from UID before using it as URL segment. 2011-11-30 09:17:28 +13:00
Andrew McMillan 54e89d407b Don't allow a / in the UID to infect the path on import. 2011-11-09 09:55:57 +13:00
Andrew McMillan 8ba55217df More fixes to CalDAV Scheduling
- Handle REPLY from ATTENDEE accepting/declining meeting.
- Handle processing on ORGANIZER further changing meeting.
2011-10-24 18:38:48 +13:00
Andrew McMillan fbd08e42c6 Fixes to calendar_auto_schedule.
- Update the SCHEDULE-STATUS parameter correctly when writing the event
to the organiser.
- Don't include ETag in PUT response when scheduling actions occur.
- Write scheduling resources to attendee calendars even when this is
an event modification.
2011-10-20 12:19:08 +13:00
Andrew McMillan 4d1f936a8b Fix tools.php to allow importing of a directory of calendars again. 2011-10-14 11:08:17 +13:00
Andrew McMillan 147abf71c6 When we create a timezone on PUT we should set the last_modified.
Ideally from the LAST-MODIFIED property in the VTIMEZONE, but failing
that we should at least use the gmdate() of the current time.
2011-10-05 17:00:37 +02:00
Andrew McMillan 5f4b40a643 One more fix for timezone database changes. 2011-09-18 17:03:37 +12:00
Andrew McMillan f9ad324ba1 Adjustments to timezones representation in the database to support timezone protocol. 2011-09-17 23:40:04 +12:00
Andrew McMillan 963de077d8 Fix typo in "SCHEDULE-AGENT" parameter name. 2011-09-14 11:26:53 +12:00
Rob Ostensen b947e1c7e2 skip scheduling attendees with schedule-agent set to something other than server
Signed-off-by: Rob Ostensen <rob@boxacle.net>
2011-09-14 11:25:28 +12:00
Andrew McMillan 4e5b824302 Make PUT processing use olson_from_tzstring(). 2011-09-13 13:12:35 +12:00
Rob Ostensen a4523dc7dd don't deliver to the current user when scheduling 2011-09-10 11:22:11 +12:00
Andrew McMillan 9a5f021173 To better represent the line where errors occurred... 2011-09-10 09:09:14 +12:00
Andrew McMillan 4f01fe0a17 Add items to attendee's calendars as well as to their inboxes on PUT. 2011-09-10 00:17:27 +12:00
Andrew McMillan 14e59fa781 Changing signatures of the write_resource() function. 2011-09-08 23:27:44 +12:00
Andrew McMillan 3b76856b44 Refactor write_resource to accept a DAVResource rather than just a path. 2011-09-08 13:51:31 +12:00
Andrew McMillan d78620398c Fix METHOD on scheduling request. 2011-09-08 09:40:47 +12:00
Andrew McMillan 13ce4c147a Add support for writing local scheduling requests on PUT.
In the new Scheduling Extensions for CalDAV the server is expected
to construct iCalendar METHOD:REQUEST invitations and put them into
the scheduling inbox for each (local) attendee.  This patch does
that, and hopefully breaks the back of implementing the full
scheduling extensions.
2011-09-07 23:40:28 +12:00
Andrew McMillan 7214c586ae Logging here should be as 'PUT', in general. 2011-08-26 01:03:53 +12:00
Andrew McMillan 06dcb0b166 Tidy up formatting. 2011-06-03 13:41:53 -07:00
Andrew McMillan 4a72ff16a3 Respond with 5.3; no Scheduling Support for user rather than 3.7
Also allow for this response when someone manually disables
the scheduling extensions support.
2011-05-17 00:21:08 +12:00
DAViCal Administrator 13fa85d8ab Only rollback if we are in a transaction. 2011-05-12 17:44:52 -04:00
Andrew McMillan 72baec50a7 Handle triggers that are after the thing they are related to.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-04-04 18:02:42 +12:00
Andrew McMillan 0f7e48ea17 When an import event has no UID we reluctantly assign one.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-04-01 18:01:46 +13:00
Andrew McMillan ea42dac661 Fix bug in schedule status response where there is no authority.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-03-02 15:26:54 +01:00
Andrew McMillan 99fde69b39 Skip alarms with bogus trigger data.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-18 00:36:46 +13:00
Andrew McMillan c7ae6826d8 Validate alarm date-time or duration before adding it to the DB.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-12 10:03:36 +13:00
Andrew McMillan 20ee255898 Refactor fetching of Principal records from database.
This is a significant refactoring, replacing the old getUserBy*()
functions with a new Principal class, and replacing the old
CalDAVPrincipal class with a new DAVPrincipal class which extends
the Principal class.

At this point all regression tests pass (again) but there could
well be issues for people who use alternative authenticators
such as LDAP, although I have endeavoured to resolve those
potential issues.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-03 10:16:43 +13:00
Andrew McMillan 4178ab4254 Add caching of collection reads
Also a special header is added for telling DAViCal to flush the
cache during regression testing etc.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-01 21:25:46 +13:00
Andrew McMillan 5ff2f052c6 Add support for caching of feed, and uncaching on collection change.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2010-12-31 20:29:30 +13:00
Andrew McMillan d615da9c55 Adjust comment wording for clarity.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2010-12-28 00:41:11 +13:00
Andrew McMillan 34a27d126d Refactor PUT functions to set modified/created dates more correctly.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2010-12-27 18:23:13 +13:00
Andrew McMillan 4876542537 Fix whitespace.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2010-12-27 12:46:00 +13:00
Andrew McMillan 066732a8a0 Add support for writing scheduling resources on PUT.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2010-12-25 15:55:19 +13:00
Andrew McMillan 74943cd243 Warn if we're being expected to log actions, but have no function. 2010-09-13 14:00:03 +12:00
Andrew McMillan b381c0c7a4 Add optional parameter to 'simple' interface to allow action logging. 2010-08-18 21:34:20 +12:00
Andrew McMillan f844d6b692 Add facility to append to a calendar with ?mode=append on PUT 2010-04-29 16:03:14 +12:00
Andrew McMillan a359553eee When a timezone is supplied, but not used in the event, pretend it was.
This gets around some buggy software which expects this kind of
thing to work.
2010-04-28 14:08:14 +12:00
Andrew McMillan 8fbb5cf3a2 Don't complain if the event includes an unused timezone. 2010-04-26 23:27:15 +12:00