Fixed editing settings of shared calendar folder (#318)
This commit is contained in:
parent
e2447a803a
commit
2138b3ed6a
1 changed files with 11 additions and 11 deletions
|
@ -235,17 +235,6 @@ class kolab_driver extends calendar_driver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check access rights to the parent folder
|
|
||||||
if (strlen($parent)) {
|
|
||||||
$this->rc->imap_connect();
|
|
||||||
$parent_opts = $this->rc->imap->mailbox_info($parent);
|
|
||||||
if ($parent_opts['namespace'] != 'personal'
|
|
||||||
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($options) && ($options['protected'] || $options['norename'])) {
|
if (!empty($options) && ($options['protected'] || $options['norename'])) {
|
||||||
$folder = $oldfolder;
|
$folder = $oldfolder;
|
||||||
}
|
}
|
||||||
|
@ -258,6 +247,17 @@ class kolab_driver extends calendar_driver
|
||||||
$folder = $this->rc->imap->mod_mailbox($folder, 'in');
|
$folder = $this->rc->imap->mod_mailbox($folder, 'in');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check access rights to the parent folder
|
||||||
|
if (strlen($parent) && (!strlen($oldfolder) || $oldfolder != $folder)) {
|
||||||
|
$this->rc->imap_connect();
|
||||||
|
$parent_opts = $this->rc->imap->mailbox_info($parent);
|
||||||
|
if ($parent_opts['namespace'] != 'personal'
|
||||||
|
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update the folder name
|
// update the folder name
|
||||||
if (strlen($oldfolder)) {
|
if (strlen($oldfolder)) {
|
||||||
if ($oldfolder != $folder)
|
if ($oldfolder != $folder)
|
||||||
|
|
Loading…
Add table
Reference in a new issue