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:

In the future we also hope to add support for:

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 happes 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.