Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube
This commit is contained in:
commit
be4f5d43ef
2 changed files with 24 additions and 22 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'])) {
|
||||
$folder = $oldfolder;
|
||||
}
|
||||
|
@ -258,6 +247,17 @@ class kolab_driver extends calendar_driver
|
|||
$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
|
||||
if (strlen($oldfolder)) {
|
||||
if ($oldfolder != $folder)
|
||||
|
|
|
@ -445,17 +445,6 @@ class kolab_addressbook extends rcube_plugin
|
|||
}
|
||||
}
|
||||
|
||||
// Check access rights to the parent folder
|
||||
if (!$error && strlen($path)) {
|
||||
$this->rc->imap_connect();
|
||||
$parent_opts = $this->rc->imap->mailbox_info($path);
|
||||
if ($parent_opts['namespace'] != 'personal'
|
||||
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
|
||||
) {
|
||||
$error = rcube_label('parentnotwritable');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if (!empty($options) && ($options['protected'] || $options['norename'])) {
|
||||
$folder = $oldfolder;
|
||||
|
@ -469,6 +458,19 @@ class kolab_addressbook extends rcube_plugin
|
|||
$folder = $this->rc->imap->mod_mailbox($folder, 'in');
|
||||
}
|
||||
|
||||
// Check access rights to the parent folder
|
||||
if (strlen($path) && (!strlen($oldfolder) || $oldfolder != $folder)) {
|
||||
$this->rc->imap_connect();
|
||||
$parent_opts = $this->rc->imap->mailbox_info($path);
|
||||
if ($parent_opts['namespace'] != 'personal'
|
||||
&& (empty($parent_opts['rights']) || !preg_match('/[ck]/', implode($parent_opts)))
|
||||
) {
|
||||
$error = rcube_label('parentnotwritable');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
// update the folder name
|
||||
if (strlen($oldfolder)) {
|
||||
$type = 'update';
|
||||
|
|
Loading…
Add table
Reference in a new issue