WebDAV Sharing
Since version 3.2, sabre/dav has support for a WebDAV sharing feature. This feature allows a client to share a file, folder, calendar or address book to another user on the same system.
sabre/dav also supplies a sample implementation for this in the CalDAV plugin. For more information on how to enable the plugin in CalDAV, read the caldav-sharing documentation instead.
The specifications that sabre/dav supports are the following:
- draft-pot-webdav-resource-sharing-04.
- draft-pot-caldav-sharing-00.
- calendarserver-caldav-sharing (the old spec).
In the future we also hope to add support for:
- draft-pot-webdav-notifications.
- calendarserver-webdav-notifications (the old spec for notifications).
- draft-pot-carddav-sharing.
Adding support for WebDAV sharing to your custom filesystem
The biggest thing you will need to do, is add support for
Sabre\DAV\Sharing\ISharedNode
to your custom filesystem nodes. This interface
supplies information about who has access to a node, and also provides a
function that will be called when the list of shares is updated.
It is up to you as an implementor to make sure that when updateInvites()
is
called, something actually happens in your filesystem that causes a second
user to see the share.
I would also highly recommend reading the actual sharing specification to get a better idea of the data-model and concept behind WebDAV sharing.
Also, make sure that you add Sabre\DAV\Sharing\Plugin
to your server to
enable the sharing POST
requests and WebDAV properties.