diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-08-18 15:53:52 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-08-18 15:54:56 +0200 |
commit | 3366bbeb8a91db9dd7f592bce8760156a23c0530 (patch) | |
tree | ba80ab3128f5960c9e54ea975a702c0243395b9e | |
parent | 141d2f67aa49d65ea5517ee0ccd9aa008463aad8 (diff) | |
download | nextcloud-server-3366bbeb8a91db9dd7f592bce8760156a23c0530.tar.gz nextcloud-server-3366bbeb8a91db9dd7f592bce8760156a23c0530.zip |
Port DAV groupMemberSet fix to master #4458
-rw-r--r-- | lib/connector/sabre/principal.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/connector/sabre/principal.php b/lib/connector/sabre/principal.php index 16c88b96ea6..59a96797c16 100644 --- a/lib/connector/sabre/principal.php +++ b/lib/connector/sabre/principal.php @@ -66,13 +66,13 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend { */ public function getGroupMemberSet($principal) { // TODO: for now the group principal has only one member, the user itself - list($prefix, $name) = Sabre_DAV_URLUtil::splitPath($principal); - - $principal = $this->getPrincipalByPath($prefix); - if (!$principal) throw new Sabre_DAV_Exception('Principal not found'); + $principal = $this->getPrincipalByPath($principal); + if (!$principal) { + throw new Sabre_DAV_Exception('Principal not found'); + } return array( - $prefix + $principal['uri'] ); } @@ -88,7 +88,9 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend { $group_membership = array(); if ($prefix == 'principals') { $principal = $this->getPrincipalByPath($principal); - if (!$principal) throw new Sabre_DAV_Exception('Principal not found'); + if (!$principal) { + throw new Sabre_DAV_Exception('Principal not found'); + } // TODO: for now the user principal has only its own groups return array( |