6.0.0-beta1
7/14/25

[#12342] Caldav for -system- shares
Summary Caldav for -system- shares
Queue Kronolith
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org, ralf.lang (at) ralf-lang (dot) de
Requester ralf.lang (at) ralf-lang (dot) de
Created 06/12/2013 (4415 days ago)
Due
Updated 07/16/2013 (4381 days ago)
Assigned
Resolved 07/16/2013 (4381 days ago)
Milestone
Patch No

History
07/16/2013 01:46:53 PM Jan Schneider Assigned to Jan Schneider
Assigned to Ralf Lang
State ⇒ Resolved
 
07/16/2013 01:46:33 PM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit 6d75378fdaa271b8952e9819f42415cbac9e5f4c
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jul 16 15:16:26 2013 +0200

     [jan] Display CalDAV URL of system tasklists (Bug #12342).

  nag/docs/CHANGES              |    1 +
  nag/lib/Form/EditTaskList.php |   30 +++++++++++++++---------------
  nag/package.xml               |    2 ++
  3 files changed, 18 insertions(+), 15 deletions(-)

http://git.horde.org/horde-git/-/commit/6d75378fdaa271b8952e9819f42415cbac9e5f4c
07/16/2013 01:46:29 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

commit 6c47f32326f85c4ce1b9339862015b5f29fd7e0b
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jul 16 14:56:35 2013 +0200

     [jan] Display CalDAV URL of system calendars and tasklists (Bug #12342).

  kronolith/docs/CHANGES                    |    1 +
  kronolith/js/kronolith.js                 |    4 +-
  kronolith/lib/Calendar/External/Tasks.php |   10 +++-----
  kronolith/lib/Calendar/Internal.php       |   10 +++-----
  kronolith/lib/Form/EditCalendar.php       |   30 ++++++++++++++--------------
  kronolith/package.xml                     |    2 +
  kronolith/templates/chunks/calendar.php   |    4 +-
  7 files changed, 30 insertions(+), 31 deletions(-)

http://git.horde.org/horde-git/-/commit/6c47f32326f85c4ce1b9339862015b5f29fd7e0b
07/11/2013 12:05:31 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 1e332785107f7373a987145eafdae8cb3fa30a51
Author: Ralf Lang <lang@b1-systems.de>
Date:   Thu Jul 11 15:03:30 2013 +0300

     Add CalDAV Support for system shares in nag and kronolith for 
Request #12342.
     This does not address CardDAV and Turba yet, but it is probably 
very similar.
     Note I have not a very deep understanding of CardDAV or CalDAV protocol.

  framework/Dav/lib/Horde/Dav/Principals.php |   19 ++++++++++++++++---
  framework/Dav/package.xml                  |    2 ++
  kronolith/docs/CHANGES                     |    1 +
  kronolith/lib/Application.php              |    6 +++++-
  kronolith/package.xml                      |    2 ++
  nag/docs/CHANGES                           |    1 +
  nag/lib/Application.php                    |    6 +++++-
  nag/package.xml                            |    2 ++
  8 files changed, 34 insertions(+), 5 deletions(-)

http://git.horde.org/horde-git/-/commit/1e332785107f7373a987145eafdae8cb3fa30a51
07/11/2013 11:37:25 AM Ralf Lang Comment #5 Reply to this comment
TODO: either implement filters for listSystemShares or add a 
systemShares filter option for listShares. listShares with 
permission::SHOW and empty user may return unrelated non-system 3rd 
party shares the user has SHOW access for.
Workaround: after fetching the listShares, filter if share has an owner:

         foreach ($shares as $id => $share) {
++            if (empty($queryUser) && $share->get('owner')) {
++                continue;
++            }
Next: push a patch to master.
07/11/2013 11:29:08 AM Ralf Lang Comment #4 Reply to this comment
On 06.07.2013 07:05, Ralf Lang wrote:> On 05.07.2013 17:32, Jan 
Schneider wrote:

[Show Quoted Text - 45 lines]
4) Horde_Dav_Principals

Give access to the calendars/-system- and principals/-system- level to 
all users. This probably needs more configuration.


     public function getGroupMembership($principal)
     {
         // All users should have access to the -system- share.
         // Needs reimplementation when horde finally implements group 
acls as share groups
         return array('principals/-system-');
     }

5) patch Kronolith_Application::davGetCollections to user '' in query 
but '-system-' in building structures.
We probably need this in nag to

     public function davGetCollections($user)
     {
++        $queryUser = $user == '-system-' ? '' : $user;

...

             ->listShares(
                 $GLOBALS['registry']->getAuth(),
                 array('perm' => Horde_Perms::SHOW,
--                        'attributes' => $user)
++                      'attributes' => $queryUser)
             );

6) Same show for nag

     public function davGetCollections($user)
     {
++    $queryUser = $user == '-system-' ? '' : $user;
         $shares = $GLOBALS['nag_shares']
             ->listShares(
                 $GLOBALS['registry']->getAuth(),
                 array('perm' => Horde_Perms::SHOW,
--                      'attributes' => $user)
++                    'attributes' => $queryUser)
             );


TODO: either implement filters for listSystemShares or add a 
systemShares filter option for listShares. listShares with 
permission::SHOW and empty user may return unrelated non-system 3rd 
party shares the user has SHOW access for.

Next: push a patch to master.
07/05/2013 02:14:33 PM Ralf Lang Comment #3
State ⇒ Feedback
Reply to this comment
Not exactly. There's more to Caldav not knowing -system-.

I've been looking around for where to patch in -system- support for Dav
shares. (kronolith, nag, turba).

The Horde_Dav system expects -system- to be a user existing in
Horde_Auth and having an Identity. I'm not sure if I should provide a
static fake identity and always have a user -system- in the dav library
or if I should promote -system- to a first class special user. I'm more
leaning to the former (less invasive).

All the converting between shares owned by "" (system) and the -system-
tag seems already to be handled by kronolith/nag themselves in browse()
and friends.
06/12/2013 09:36:28 PM Jan Schneider Comment #2
State ⇒ Duplicate
Reply to this comment
06/12/2013 08:57:39 AM Ralf Lang Comment #1
Milestone ⇒
State ⇒ New
Patch ⇒ No
Queue ⇒ Kronolith
Summary ⇒ Caldav for -system- shares
Type ⇒ Enhancement
Priority ⇒ 1. Low
Reply to this comment
Hi, I'm currently at B1 hack week. I noticed the caldav interface does 
not support -system- shares.
Is there any technical intricacy preventing this?
Otherwise I'd go for a simple patch tonight.

Saved Queries