mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Get permissions from Contact if exists, otherwise AddressBook. Refs #457
This commit is contained in:
parent
f4d6576363
commit
abb3166e90
@ -76,6 +76,9 @@ class Contact extends VObject\VCard implements IPIMObject {
|
||||
case 'id':
|
||||
$this->props['id'] = $value;
|
||||
break;
|
||||
case 'permissions':
|
||||
$this->props['permissions'] = $value;
|
||||
break;
|
||||
case 'lastmodified':
|
||||
$this->props['lastmodified'] = $value;
|
||||
break;
|
||||
@ -198,7 +201,9 @@ class Contact extends VObject\VCard implements IPIMObject {
|
||||
* @return integer
|
||||
*/
|
||||
public function getPermissions() {
|
||||
return $this->props['parent']->getPermissions();
|
||||
return isset($this->props['permissions'])
|
||||
? $this->props['permissions']
|
||||
: $this->props['parent']->getPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user