summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-02 13:24:52 +0100
committerAleksander Machniak <alec@alec.pl>2013-12-02 13:24:52 +0100
commit9b22f58d4ebc54a251941c48b15e9d9d71a54205 (patch)
tree582e030ed0e2f4f48c8174f6e4c0fd7771dfa261 /program
parent3b338f1e4f76c48c13eaa1166342168f06d5ab80 (diff)
parent38bf401cf88bc88d3b4d96fee8d2166cc2cac8c6 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_imap.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index fdda1d4b2..dc5305808 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -2843,12 +2843,21 @@ class rcube_imap extends rcube_storage
/**
* Filter the given list of folders according to access rights
+ *
+ * For performance reasons we assume user has full rights
+ * on all personal folders.
*/
protected function filter_rights($a_folders, $rights)
{
$regex = '/('.$rights.')/';
+
foreach ($a_folders as $idx => $folder) {
+ if ($this->folder_namespace($folder) == 'personal') {
+ continue;
+ }
+
$myrights = join('', (array)$this->my_rights($folder));
+
if ($myrights !== null && !preg_match($regex, $myrights)) {
unset($a_folders[$idx]);
}