summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-28 10:43:50 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-28 11:29:32 +0200
commit9899abc36caf00ed2a054b309607aa868e314e07 (patch)
tree05918d7918876dab96315d90dd48ff8b2b5932c5 /program
parent77799d87ba05a8e96d604693dcfa003b5835fe2b (diff)
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). Conflicts: program/include/rcube_imap.php Conflicts: plugins/acl/acl.php plugins/acl/package.xml program/include/rcube_imap.php
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index ed84845c4..f06a8ee70 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3653,7 +3653,7 @@ class rcube_imap
$options['rights'] = $acl && !$options['is_root'] ? (array)$this->my_rights($mailbox) : array();
$options['special'] = in_array($mailbox, $this->default_folders);
- // Set 'noselect' and 'norename' flags
+ // Set 'noselect' flag
if (is_array($options['attributes'])) {
foreach ($options['attributes'] as $attrib) {
$attrib = strtolower($attrib);
@@ -3666,6 +3666,15 @@ class rcube_imap
$options['noselect'] = true;
}
+ // Get folder rights (MYRIGHTS)
+ if ($acl && !$options['noselect']) {
+ // skip shared roots
+ if (!$options['is_root'] || $options['namespace'] == 'personal') {
+ $options['rights'] = (array)$this->my_rights($mailbox);
+ }
+ }
+
+ // Set 'norename' flag
if (!empty($options['rights'])) {
$options['norename'] = !in_array('x', $options['rights']) && !in_array('d', $options['rights']);