diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-06-28 10:43:50 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-06-28 11:21:16 +0200 |
commit | e4c9942543d23f8462e125f25665c6fab0f9c93f (patch) | |
tree | 22a6b85253332978eaa0c4a6cf2efe11f96adccb /program/include/rcube_imap.php | |
parent | 1d0c3f557585a7d1ab319455a5af288f82fedf75 (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
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r-- | program/include/rcube_imap.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 419e26c65..205278963 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -3250,10 +3250,9 @@ class rcube_imap extends rcube_storage $options['name'] = $folder; $options['attributes'] = $this->folder_attributes($folder, true); $options['namespace'] = $this->folder_namespace($folder); - $options['rights'] = $acl && !$options['is_root'] ? (array)$this->my_rights($folder) : array(); $options['special'] = in_array($folder, $this->default_folders); - // Set 'noselect' and 'norename' flags + // Set 'noselect' flag if (is_array($options['attributes'])) { foreach ($options['attributes'] as $attrib) { $attrib = strtolower($attrib); @@ -3266,6 +3265,15 @@ class rcube_imap extends rcube_storage $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($folder); + } + } + + // Set 'norename' flag if (!empty($options['rights'])) { $options['norename'] = !in_array('x', $options['rights']) && !in_array('d', $options['rights']); |