diff options
Diffstat (limited to 'apps/dav/lib/connector/sabre/principal.php')
-rw-r--r-- | apps/dav/lib/connector/sabre/principal.php | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/apps/dav/lib/connector/sabre/principal.php b/apps/dav/lib/connector/sabre/principal.php index cc9c1c40d59..c917b11225a 100644 --- a/apps/dav/lib/connector/sabre/principal.php +++ b/apps/dav/lib/connector/sabre/principal.php @@ -33,22 +33,20 @@ namespace OCA\DAV\Connector\Sabre; use OCP\IUser; use OCP\IUserManager; use OCP\IConfig; +use Sabre\DAV\Exception; use \Sabre\DAV\PropPatch; +use Sabre\DAVACL\PrincipalBackend\BackendInterface; use Sabre\HTTP\URLUtil; -class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { - /** @var IConfig */ - private $config; +class Principal implements BackendInterface { + /** @var IUserManager */ private $userManager; /** - * @param IConfig $config * @param IUserManager $userManager */ - public function __construct(IConfig $config, - IUserManager $userManager) { - $this->config = $config; + public function __construct(IUserManager $userManager) { $this->userManager = $userManager; } @@ -108,13 +106,13 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { * * @param string $principal * @return string[] - * @throws \Sabre\DAV\Exception + * @throws Exception */ public function getGroupMemberSet($principal) { // TODO: for now the group principal has only one member, the user itself $principal = $this->getPrincipalByPath($principal); if (!$principal) { - throw new \Sabre\DAV\Exception('Principal not found'); + throw new Exception('Principal not found'); } return [$principal['uri']]; @@ -125,7 +123,7 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { * * @param string $principal * @return array - * @throws \Sabre\DAV\Exception + * @throws Exception */ public function getGroupMembership($principal) { list($prefix, $name) = URLUtil::splitPath($principal); @@ -134,7 +132,7 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { if ($prefix === 'principals/users') { $principal = $this->getPrincipalByPath($principal); if (!$principal) { - throw new \Sabre\DAV\Exception('Principal not found'); + throw new Exception('Principal not found'); } // TODO: for now the user principal has only its own groups @@ -157,10 +155,10 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { * * @param string $principal * @param string[] $members - * @throws \Sabre\DAV\Exception + * @throws Exception */ public function setGroupMemberSet($principal, array $members) { - throw new \Sabre\DAV\Exception('Setting members of the group is not supported yet'); + throw new Exception('Setting members of the group is not supported yet'); } /** |