Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2021-05-09 18:57:30 +0300
committerdartcafe <github@dartcafe.de>2021-05-09 18:57:30 +0300
commit384b860c35f90d346a524f1519a57e0149e9e1c7 (patch)
tree0f9e10085f074391d817b3dff3d93a29d791635a /lib/Service/ShareService.php
parent647b0fd4e3e283423c9ffc8e1451fdfc4a0de89c (diff)
rename acl constants
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib/Service/ShareService.php')
-rw-r--r--lib/Service/ShareService.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Service/ShareService.php b/lib/Service/ShareService.php
index 242440cc..fd45c96f 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_EDIT);
+ $this->acl->setPollId($pollId)->request(Acl::PERMISSION_POLL_EDIT);
$shares = $this->shareMapper->findByPoll($pollId);
} catch (NotAuthorizedException $e) {
return [];
@@ -165,7 +165,7 @@ class ShareService {
if ($this->share->getType() === Share::TYPE_PUBLIC && \OC::$server->getUserSession()->isLoggedIn()) {
try {
// Test if the user has already access.
- $this->acl->setPollId($this->share->getPollId())->request(Acl::PERMISSION_VIEW);
+ $this->acl->setPollId($this->share->getPollId())->request(Acl::PERMISSION_POLL_VIEW);
} catch (NotAuthorizedException $e) {
// If he is not authorized until now, create a new personal share for this user.
// Return the created share
@@ -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_EDIT);
+ $this->acl->setPollId($pollId)->request(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_EDIT);
+ $this->acl->setPollId($this->share->getPollId())->request(Acl::PERMISSION_POLL_EDIT);
$this->shareMapper->delete($this->share);
} catch (DoesNotExistException $e) {
// silently catch