Changeset View
Changeset View
Standalone View
Standalone View
lib/Kolab/CardDAV/AddressBook.php
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | class AddressBook extends \Sabre\CardDAV\AddressBook implements \Sabre\CardDAV\IAddressBook, DAV\IProperties, DAVACL\IACL | ||||
* be updated. | * be updated. | ||||
* | * | ||||
* @return array | * @return array | ||||
*/ | */ | ||||
public function getACL() | public function getACL() | ||||
{ | { | ||||
// return ACL information based on IMAP MYRIGHTS | // return ACL information based on IMAP MYRIGHTS | ||||
$rights = $this->storage ? $this->storage->get_myrights() : null; | $rights = $this->storage ? $this->storage->get_myrights() : null; | ||||
if ($rights && !PEAR::isError($rights)) { | if ($rights && !is_a($rights, 'PEAR_Error')) { | ||||
// user has at least read access to calendar folders listed | // user has at least read access to calendar folders listed | ||||
$acl = array( | $acl = array( | ||||
array( | array( | ||||
'privilege' => '{DAV:}read', | 'privilege' => '{DAV:}read', | ||||
'principal' => $this->addressBookInfo['principaluri'], | 'principal' => $this->addressBookInfo['principaluri'], | ||||
'protected' => true, | 'protected' => true, | ||||
), | ), | ||||
); | ); | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |