diff options
author | dartcafe <github@dartcafe.de> | 2021-05-11 22:45:48 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-05-11 22:45:48 +0300 |
commit | 34fe2e9e43fb1f476590e5c8c12b700d63af2249 (patch) | |
tree | 535883c7b2b29682f47b6835ac00b0002ed7cd80 /lib/Service/ShareService.php | |
parent | 7395d946b72aaedd3a2ad47fada7eedd809a92eb (diff) |
request acl permission in setter
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib/Service/ShareService.php')
-rw-r--r-- | lib/Service/ShareService.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php index c34251b0..ecb2336f 100644 --- a/lib/Service/ShareService.php +++ b/lib/Service/ShareService.php @@ -103,7 +103,7 @@ class ShareService { */ public function list(int $pollId): array { try { - $this->acl->setPollId($pollId)->request(Acl::PERMISSION_POLL_EDIT); + $this->acl->setPollId($pollId, Acl::PERMISSION_POLL_EDIT); $shares = $this->shareMapper->findByPoll($pollId); } catch (NotAuthorizedException $e) { return []; @@ -230,7 +230,7 @@ class ShareService { * @return Share */ public function add(int $pollId, string $type, string $userId = ''): Share { - $this->acl->setPollId($pollId)->request(Acl::PERMISSION_POLL_EDIT); + $this->acl->setPollId($pollId, Acl::PERMISSION_POLL_EDIT); if ($type !== UserGroupClass::TYPE_PUBLIC) { try { @@ -345,7 +345,7 @@ class ShareService { public function delete(string $token): string { try { $this->share = $this->shareMapper->findByToken($token); - $this->acl->setPollId($this->share->getPollId())->request(Acl::PERMISSION_POLL_EDIT); + $this->acl->setPollId($this->share->getPollId(), Acl::PERMISSION_POLL_EDIT); $this->shareMapper->delete($this->share); } catch (DoesNotExistException $e) { // silently catch |