Use new getMyRights() instead of getACL() for better performance (Kolab_Storage-0.5.2 required)
This commit is contained in:
parent
f56e78fbf8
commit
8e78e653f3
2 changed files with 7 additions and 9 deletions
|
@ -66,10 +66,9 @@ class kolab_calendar
|
|||
$this->alarms = true;
|
||||
}
|
||||
else {
|
||||
$acl = $this->storage->_folder->getACL();
|
||||
if (is_array($acl)) {
|
||||
$acl = $acl[$_SESSION['username']];
|
||||
if (strpos($acl, 'i') !== false)
|
||||
$rights = $this->storage->_folder->getMyRights();
|
||||
if (!PEAR::isError($rights)) {
|
||||
if (strpos($rights, 'i') !== false)
|
||||
$this->readonly = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,12 +127,11 @@ class rcube_kolab_contacts extends rcube_addressbook
|
|||
$this->readonly = false;
|
||||
}
|
||||
else {
|
||||
$acl = $this->storagefolder->getACL();
|
||||
if (!PEAR::isError($acl) && is_array($acl)) {
|
||||
$acl = $acl[$_SESSION['username']];
|
||||
if (strpos($acl, 'i') !== false)
|
||||
$rights = $this->storagefolder->getMyRights();
|
||||
if (!PEAR::isError($rights)) {
|
||||
if (strpos($rights, 'i') !== false)
|
||||
$this->readonly = false;
|
||||
if (strpos($acl, 'a') !== false || strpos($acl, 'x') !== false)
|
||||
if (strpos($rights, 'a') !== false || strpos($rights, 'x') !== false)
|
||||
$this->editable = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue