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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-09-22 17:59:41 +0300
committerJoas Schilling <coding@schilljs.com>2021-10-07 19:18:30 +0300
commit1b13f80cc119eb386afe72866e6f4f8f9537c471 (patch)
treefbaa50ec2d584fccc828e9359323d0a99c7f398d /lib/Service
parent390ae657a18523bb0b39f6531fa27de9bb075410 (diff)
Allow to remove all permissions without falling back to the next level
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/ParticipantService.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php
index 04a6be2cf..91a87bc2e 100644
--- a/lib/Service/ParticipantService.php
+++ b/lib/Service/ParticipantService.php
@@ -148,6 +148,10 @@ class ParticipantService {
}
$oldState = $participant->getPermissions();
+ if ($newState !== Attendee::PERMISSIONS_DEFAULT) {
+ // Make sure the custom flag is set when not setting to default permissions
+ $newState |= Attendee::PERMISSIONS_CUSTOM;
+ }
$event = new ModifyParticipantEvent($room, $participant, 'permissions', $newState, $oldState);
$this->dispatcher->dispatch(Room::EVENT_BEFORE_PARTICIPANT_PERMISSIONS_SET, $event);