diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-30 12:44:55 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-08-30 12:46:00 +0300 |
commit | dfe7b6c729881d5c2b9e61ed967d6668a8b13612 (patch) | |
tree | d8709c491dc268e4cc00cbf9560ed42decafa0ab /lib | |
parent | 2eabd09767d8f5caf4dec9f4b7eb230bfc54b130 (diff) |
Make handling of guest moderators consistent on different endpoints for the same features
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Chat/ChatManager.php | 2 | ||||
-rw-r--r-- | lib/Controller/PollController.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Chat/ChatManager.php b/lib/Chat/ChatManager.php index 08359f004..d26cbeb40 100644 --- a/lib/Chat/ChatManager.php +++ b/lib/Chat/ChatManager.php @@ -343,7 +343,7 @@ class ChatManager { $attendee = $participant->getAttendee(); - if (!$participant->hasModeratorPermissions() && + if (!$participant->hasModeratorPermissions(false) && !($attendee->getActorType() === Attendee::ACTOR_USERS && $attendee->getActorId() === $share->getShareOwner())) { // Only moderators or the share owner can delete the share return; diff --git a/lib/Controller/PollController.php b/lib/Controller/PollController.php index 5b0c183dc..15d395bd7 100644 --- a/lib/Controller/PollController.php +++ b/lib/Controller/PollController.php @@ -252,7 +252,7 @@ class PollController extends AEnvironmentAwareController { if (!$canSeeSummary && $poll->getStatus() === Poll::STATUS_OPEN) { $data['votes'] = []; - if ($this->participant->hasModeratorPermissions(false) + if ($this->participant->hasModeratorPermissions() || ($poll->getActorType() === $this->participant->getAttendee()->getActorType() && $poll->getActorId() === $this->participant->getAttendee()->getActorId())) { // Allow moderators and the author to see the number of voters, |