From 9899abc36caf00ed2a054b309607aa868e314e07 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 28 Jun 2012 05:29:32 -0400
Subject: [PATCH] Fix handling of MYRIGHTS on private namespace roots - fixes issue where in ACL plugin it wasn't possible to share INBOX folder (when it was a namespace prefix).

---
 plugins/acl/acl.php |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php
index b2e5b8d..cb47e66 100644
--- a/plugins/acl/acl.php
+++ b/plugins/acl/acl.php
@@ -129,8 +129,10 @@
      */
     function folder_form($args)
     {
-        // Edited folder name (empty in create-folder mode)
         $mbox_imap = $args['options']['name'];
+        $myrights  = $args['options']['rights'];
+
+        // Edited folder name (empty in create-folder mode)
         if (!strlen($mbox_imap)) {
             return $args;
         }
@@ -140,18 +142,17 @@
             return $args;
         }
 */
-        // Namespace root
-        if ($args['options']['is_root']) {
-            return $args;
-        }
-
         // Get MYRIGHTS
+<<<<<<< HEAD
         if (!($myrights = $args['options']['rights'])) {
             return $args;
         }
 
         // Do nothing if no ACL support
         if (!$this->rc->imap->get_capability('ACL')) {
+=======
+        if (empty($myrights)) {
+>>>>>>> e4c9942... Fix handling of MYRIGHTS on private namespace roots - fixes issue where
             return $args;
         }
 

--
Gitblit v1.9.1