[Pkg-owncloud-commits] [php-sabredav] 115/220: Docs changes
David Prévot
taffit at moszumanska.debian.org
Thu May 12 01:21:15 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 83727021c82c1087c43bd2ee45c700e0a346a413
Author: Evert Pot <me at evertpot.com>
Date: Wed Mar 30 01:37:52 2016 -0400
Docs changes
---
CHANGELOG.md | 14 ++++-
lib/CalDAV/Backend/SharingSupport.php | 113 +++-------------------------------
lib/CalDAV/Backend/SimplePDO.php | 19 ++++--
lib/DAV/Xml/Property/Invite.php | 2 +-
4 files changed, 39 insertions(+), 109 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 270eb1a..9fc5d88 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,14 +4,26 @@ ChangeLog
3.2.0-alpha1 (????-??-??)
-------------------------
+* Database changes for CalDAV. If you are using the CalDAV PDO backends, you
+ must migrate. Run `./bin/migrateto32.php` for more info.
+* Support for WebDAV Resource Sharing, an upcoming standard.
+* Added support for sharing in the CalDAV PDO backend! Users can now invite
+ others to their calendar and give them read/read-write access!
* Removed database migration script for sabre/dav 1.7. To update from that
version you now first need to update to sabre/dav 3.1.
* Removed deprecated function: `Sabre\DAV\Auth\Plugin::getCurrentUser()`.
* #774: Fixes for getting free disk space on Windows.
+* #803: Major changes in the sharing API. If you were using an old sabre/dav
+ sharing api, head to the website for more detailed migration notes.
* #801: BC break: If you were using the `Href` object before, it's behavior
now changed a bit, and `LocalHref` was added to replace the old, default
behavior of `Href`. See the migration doc for more info.
-
+* Added Sharing, ICSExport and VCFExport plugins to `groupwareserver.php`
+ example.
+* Added a new `getPrincipalByUri` plugin event. Allowing plugins to request
+ quickly where a principal lives on a server.
+* Renamed `phpunit.xml` to `phpunit.xml.dist` to make local modifications easy.
+* Functionality from `IShareableCalendar` is merged into `ISharedCalendar`.
3.1.3 (????-??-??)
------------------
diff --git a/lib/CalDAV/Backend/SharingSupport.php b/lib/CalDAV/Backend/SharingSupport.php
index f3aa6ad..8b6e074 100644
--- a/lib/CalDAV/Backend/SharingSupport.php
+++ b/lib/CalDAV/Backend/SharingSupport.php
@@ -5,109 +5,16 @@ namespace Sabre\CalDAV\Backend;
/**
* Adds support for sharing features to a CalDAV server.
*
- * Note: This feature is experimental, and may change in between different
- * SabreDAV versions.
- *
- * https://trac.calendarserver.org/browser/CalendarServer/trunk/doc/Extensions/caldav-sharing.txt
- *
- * An overview
- * ===========
- *
- * Implementing this interface will allow a user to share his or her calendars
- * to other users. Effectively, when a calendar is shared the calendar will
- * show up in both the Sharer's and Sharee's calendar-home root.
- * This interface adds a few methods that ensure that this happens, and there
- * are also a number of new requirements in the base-class you must now follow.
- *
- *
- * How it works
- * ============
- *
- * When a user shares a calendar, the updateShares() method will be called with
- * a list of sharees that are now added, and a list of sharees that have been
- * removed.
- *
- * Calendar access by sharees
- * ==========================
- *
- * As mentioned earlier, shared calendars must now also be returned for
- * getCalendarsForUser for sharees. A few things change though.
- *
- * The following key must be returned for shared calendars:
- *
- * share-access
- *
- * If the calendar is shared, share-access must be provided and must be one of
- * the Sabre\DAV\Sharing\Plugin::ACCESS_ constants.
- *
- * Only when this is done, the calendar will correctly be marked as a calendar
- * that's shared to him, thus allowing clients to display the correct interface
- * and ACL enforcement.
- *
- * Deleting calendars
- * ==================
- *
- * As an implementor you also need to make sure that deleting calendars
- * behaves as expected.
- *
- * If a sharee deletes their calendar, only their instance of the calendar
- * should be deleted, the original should still exists.
- *
- * Per user-data
- * ============
- *
- * Lastly, objects *within* calendars should also have user-specific data. The
- * two things that are user-specific are:
- * * VALARM objects
- * * The TRANSP property
- *
- * This _also_ implies that if a VALARM is deleted by a sharee for some event,
- * this has no effect on the original VALARM.
- *
- * Understandably, the this last requirement is one of the hardest.
- *
- * Publishing
- * ==========
- *
- * When a user publishes a url, the server should generate a 'publish url'.
- * This is a read-only url, anybody can use to consume the calendar feed.
- *
- * Calendars are in one of two states:
- * * published
- * * unpublished
- *
- * If a calendar is published, the following property should be returned
- * for each calendar in getCalendarsForUser.
- *
- * {http://calendarserver.org/ns/}publish-url
- *
- * This element should contain a {DAV:}href element, which points to the
- * public url that does not require authentication. Unlike every other href,
- * this url must be absolute.
- *
- * Ideally, the following property is always returned
- *
- * {http://calendarserver.org/ns/}pre-publish-url
- *
- * This property should contain the url that the calendar _would_ have, if it
- * were to be published. iCal uses this to display the url, before the user
- * will actually publish it.
- *
- *
- * Integration with notifications
- * ==============================
- *
- * If the SharingSupport interface is implemented, it's possible to allow
- * people to immediately share calendars with other users.
- *
- * However, in some cases it may be desired to let the invitee first know
- * that someone is trying to share something with them, and allow them to
- * accept or reject the share.
- *
- * If this behavior is desired, it's also required to implement the
- * NotificationSupport interface. Implementing that interface will allow
- * supporting clients to display invitations and let users accept or reject
- * them straight from within their calendaring application.
+ * CalDAV backends that implement this interface, must make the following
+ * modifications to getCalendarsForUser:
+ *
+ * 1. Return shared calendars for users.
+ * 2. For every calendar, return calendar-resource-uri. This strings is a URI or
+ * relative URI reference that must be unique for every calendar, but
+ * identical for every instance of the same shared calenar.
+ * 3. For every calenar, you must return a share-access element. This element
+ * should contain one of the Sabre\DAV\Sharing\Plugin:ACCESS_* contants and
+ * indicates the access level the user has.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
diff --git a/lib/CalDAV/Backend/SimplePDO.php b/lib/CalDAV/Backend/SimplePDO.php
index d34d082..6c3767a 100644
--- a/lib/CalDAV/Backend/SimplePDO.php
+++ b/lib/CalDAV/Backend/SimplePDO.php
@@ -8,10 +8,21 @@ use Sabre\DAV;
/**
* Simple PDO CalDAV backend.
*
- * This backend class serves as a demononstration on how to create a very
- * simple CalDAV backend.
+ * This class is basically the most minmum example to get a caldav backend up
+ * and running. This class uses the following schema (MySQL example):
*
- * Unlike the 'PDO' class, this class only has the most basic features.
+ * CREATE TABLE simple_calendars (
+ * id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ * uri VARBINARY(200) NOT NULL,
+ * principaluri VARBINARY(200) NOT NULL
+ * );
+ *
+ * CREATE TABLE simple_calendarobjects (
+ * id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ * calendarid INT UNSIGNED NOT NULL,
+ * uri VARBINARY(200) NOT NULL,
+ * calendardata MEDIUMBLOB
+ * )
*
* To make this class work, you absolutely need to have the PropertyStorage
* plugin enabled.
@@ -67,7 +78,7 @@ class SimplePDO extends AbstractBackend {
function getCalendarsForUser($principalUri) {
// Making fields a comma-delimited list
- $stmt = $this->pdo->prepare("SELECT id, uri FROM simple_calendars WHERE principaluri = ? ORDER BY calendarorder ASC");
+ $stmt = $this->pdo->prepare("SELECT id, uri FROM simple_calendars WHERE principaluri = ? ORDER BY id ASC");
$stmt->execute([$principalUri]);
$calendars = [];
diff --git a/lib/DAV/Xml/Property/Invite.php b/lib/DAV/Xml/Property/Invite.php
index 1fab4d0..8a6e5d5 100644
--- a/lib/DAV/Xml/Property/Invite.php
+++ b/lib/DAV/Xml/Property/Invite.php
@@ -10,7 +10,7 @@ use Sabre\Xml\Writer;
* This class represents the {DAV:}invite property.
*
* This property is defined here:
- * https://tools.ietf.org/html/draft-pot-webdav-resource-sharing-03#section-4.4.2
+ * https://tools.ietf.org/html/draft-pot-webdav-resource-sharing-03#section-4.4.2
*
* This property is used by clients to determine who currently has access to
* a shared resource, what their access level is and what their invite status
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list