From 8b61c7fe4bf9bf999f9043b744d35cc3e2f3523d Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 24 Sep 2018 11:20:10 +0200 Subject: [PATCH] Allow a subscribed owner/admin to kick participants and visitors --- src/mod_muc_room.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index fec21d2f5..6d92b7092 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -2988,6 +2988,11 @@ can_change_ra(_FAffiliation, _FRole, _TAffiliation, can_change_ra(_FAffiliation, moderator, _TAffiliation, visitor, role, none, _ServiceAf) -> true; +can_change_ra(FAffiliation, subscriber, _TAffiliation, + visitor, role, none, _ServiceAf) + when (FAffiliation == owner) or + (FAffiliation == admin) -> + true; can_change_ra(_FAffiliation, moderator, _TAffiliation, visitor, role, participant, _ServiceAf) -> true; @@ -3004,6 +3009,11 @@ can_change_ra(FAffiliation, _FRole, _TAffiliation, can_change_ra(_FAffiliation, moderator, _TAffiliation, participant, role, none, _ServiceAf) -> true; +can_change_ra(FAffiliation, subscriber, _TAffiliation, + participant, role, none, _ServiceAf) + when (FAffiliation == owner) or + (FAffiliation == admin) -> + true; can_change_ra(_FAffiliation, moderator, _TAffiliation, participant, role, visitor, _ServiceAf) -> true;