Port DAV groupMemberSet fix to master #4458

This commit is contained in:
Thomas Tanghus 2013-08-18 15:53:52 +02:00
parent 141d2f67aa
commit 3366bbeb8a

View file

@ -66,13 +66,13 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend {
*/ */
public function getGroupMemberSet($principal) { public function getGroupMemberSet($principal) {
// TODO: for now the group principal has only one member, the user itself // TODO: for now the group principal has only one member, the user itself
list($prefix, $name) = Sabre_DAV_URLUtil::splitPath($principal); $principal = $this->getPrincipalByPath($principal);
if (!$principal) {
$principal = $this->getPrincipalByPath($prefix); throw new Sabre_DAV_Exception('Principal not found');
if (!$principal) throw new Sabre_DAV_Exception('Principal not found'); }
return array( return array(
$prefix $principal['uri']
); );
} }
@ -88,7 +88,9 @@ class OC_Connector_Sabre_Principal implements Sabre_DAVACL_IPrincipalBackend {
$group_membership = array(); $group_membership = array();
if ($prefix == 'principals') { if ($prefix == 'principals') {
$principal = $this->getPrincipalByPath($principal); $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 // TODO: for now the user principal has only its own groups
return array( return array(