summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak (Kolab Systems) <machniak@kolabsys.com>2011-08-19 08:13:14 (GMT)
committerJeroen van Meeuwen (Ergo Project) <jeroen.van.meeuwen@ergo-project.org>2011-08-19 15:14:30 (GMT)
commit09749ee09f5ca025ab19b40f975ec02205a19431 (patch)
tree1441631526b4f23d1a9d68f8b0ac190406843bc7
parent91ad5ed5f1873bf2036764572dd8ff3e887666e2 (diff)
downloadroundcubemail-plugins-kolab-roundcube-plugins-kolab-0.6beta2.tar.gz
Don't allow changeing shared folder type, according to ACL (#352)roundcube-plugins-kolab-0.6beta2
-rw-r--r--plugins/kolab_folders/kolab_folders.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/plugins/kolab_folders/kolab_folders.php b/plugins/kolab_folders/kolab_folders.php
index de63a20..b484637 100644
--- a/plugins/kolab_folders/kolab_folders.php
+++ b/plugins/kolab_folders/kolab_folders.php
@@ -205,6 +205,26 @@ class kolab_folders extends rcube_plugin
$ctype = 'mail';
}
+ // Don't allow changing type of shared folder, according to ACL
+ if (strlen($mbox)) {
+ $options = $this->rc->imap->mailbox_info($mbox);
+ if ($options['namespace'] != 'personal' && !in_array('a', $options['rights'])) {
+ if (in_array($ctype, $this->types))
+ $value = $this->gettext('foldertype'.$ctype);
+ else
+ $value = $ctype;
+ if ($subtype)
+ $value .= ' ('. ($subtype == 'default' ? $this->gettext('default') : $subtype) .')';
+
+ $args['form']['props']['fieldsets']['settings']['content']['foldertype'] = array(
+ 'label' => $this->gettext('folderctype'),
+ 'value' => $value,
+ );
+
+ return $args;
+ }
+ }
+
// Add javascript script to the client
$this->include_script('kolab_folders.js');