From eb02d3e04757e53672323accf58d8b28358431ad Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Wed, 8 Jan 2014 16:33:05 +0100 Subject: [PATCH] enable calendar sharing --- conf/caldav.php | 2 +- sources/web/application/libraries/Caldav.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/conf/caldav.php b/conf/caldav.php index 4b3a927..0702c0a 100755 --- a/conf/caldav.php +++ b/conf/caldav.php @@ -84,7 +84,7 @@ $config['public_caldav_url'] = ''; * support WebDAV ACLs disable sharing */ -$config['enable_calendar_sharing'] = FALSE; +$config['enable_calendar_sharing'] = TRUE; // Default permissions for calendar owner $config['owner_permissions'] = array('all', 'read', 'unlock', 'read-acl', diff --git a/sources/web/application/libraries/Caldav.php b/sources/web/application/libraries/Caldav.php index 909313a..9896d60 100644 --- a/sources/web/application/libraries/Caldav.php +++ b/sources/web/application/libraries/Caldav.php @@ -500,6 +500,23 @@ class Caldav { */ function setacl( $user, $passwd, $calendar = '', $share_with = array()) { + + /** + * Modification for Yunohost + * + * Radicale does not support ACL as Agendav implements it, + * and this triggers an error 502. + * + * But Radicale is set up without ACL (because of the LDAP plugin), + * so actually all users have read-write access to all other users + * collections. + * This is sufficient for us to enable the sharing of calendars in + * AgenDAV. We simply skip the ACL request. Sharing status is + * stored by AgenDAV in its db. + * + */ + return TRUE; + $this->prepare_client($user, $passwd, ''); // Preconditions