summaryrefslogtreecommitdiff
path: root/jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch
diff options
context:
space:
mode:
authorAntoine Ouvrard <antoine.ouvrard@nereide.fr>2020-11-23 10:28:32 +0100
committerAntoine Ouvrard <antoine.ouvrard@nereide.fr>2020-11-23 10:28:32 +0100
commitd3277d65639ef43230b71305922b5ccf33d86083 (patch)
tree87455d87a534c1bcb33a34290b840b68e573df96 /jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch
initial commit
Diffstat (limited to 'jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch')
-rw-r--r--jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch b/jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch
new file mode 100644
index 0000000..5e5c245
--- /dev/null
+++ b/jitsi-meet/prosody-plugins/muc_owner_allow_kick.patch
@@ -0,0 +1,21 @@
+--- muc.lib.lua 2016-10-26 18:26:53.432377291 +0000
++++ muc.lib.lua 2016-10-26 18:41:40.754426072 +0000
+@@ -1256,15 +1256,16 @@
+ if actor == true then
+ actor = nil -- So we can pass it safely to 'publicise_occupant_status' below
+ else
++ local actor_affiliation = self:get_affiliation(actor);
++
+ -- Can't do anything to other owners or admins
+ local occupant_affiliation = self:get_affiliation(occupant.bare_jid);
+- if occupant_affiliation == "owner" or occupant_affiliation == "admin" then
++ if (occupant_affiliation == "owner" and actor_affiliation ~= "owner") or (occupant_affiliation == "admin" and actor_affiliation ~= "admin" and actor_affiliation ~= "owner") then
+ return nil, "cancel", "not-allowed";
+ end
+
+ -- If you are trying to give or take moderator role you need to be an owner or admin
+ if occupant.role == "moderator" or role == "moderator" then
+- local actor_affiliation = self:get_affiliation(actor);
+ if actor_affiliation ~= "owner" and actor_affiliation ~= "admin" then
+ return nil, "cancel", "not-allowed";
+ end