4

I've searched the iCalendar spec https://www.rfc-editor.org/rfc/rfc5545 and the CalDAV spec https://www.rfc-editor.org/rfc/rfc4791 looking for insight on how to mark an event that is sent from our calendar server to an iPhone as "read-only" (non-editable) when the iPhone connects to our server using the CalDAV protocol. But the answer is not jumping out at me.

In other words, the iPhone user is receiving, via a CalDAV account a bunch of events. Normally, they can edit any of these events. However, we want to be able to mark a few as read-only. I know that we can use the iPhone ability to add an .ics subscription account, but we don't really want to do this, because it requires the iPhone user to add BOTH a CalDAV and an .ics subscription account.

We are using SabreDAV as our CalDAV server.

My technical co-worker has asked me to look into this, so I am asking for help from the Stackoverflow community.

Any help or hints will be greatly appreciated.

Community
  • 1
  • 1
Bill Caswell
  • 557
  • 1
  • 5
  • 15

2 Answers2

0

Once you've sent the file to the user it's theirs to deal with so...

I would say there isn't a way to protect the appointment/event from modification.

What you can however do is host the whole calendar yourself and if the user has Outlook or similiar, to subscribe to that RSS feed.

It's one idea... but for protecting what you send them? Highly doubtful. Just take heart they are only modifying their copy of your data, not the source data itself.

whiskeyfur
  • 736
  • 1
  • 5
  • 14
0

1/ You can use shared calendars and invite the user as a read-only. However, the user will have 2 calendars: its own and the shared calendar. Still, it's the same CalDAV account so the user has just one checkbox to click to opt in.

2/ I've not tried ACL but maybe you can play with it.

3/ As a dirtly last resort, you can edit Sabre\CalDAV\Backend\PDO::updateCalendarObject and deleteCalendarObject and add your conditions. But that's very low-level at this point (this class doesn't even know who's doing the change). I don't recommend it.

KrisWebDev
  • 9,342
  • 4
  • 39
  • 59