From e054c2800b22913718e06259c413b29afd42c1ef Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 25 Sep 2018 10:43:38 +0200 Subject: [PATCH] Allow a subscribed owner/admin to kick lower-affiliation moderator --- src/mod_muc_room.erl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl index bc4b0a05b..ede3c8ebb 100644 --- a/src/mod_muc_room.erl +++ b/src/mod_muc_room.erl @@ -3055,11 +3055,20 @@ can_change_ra(owner, moderator, TAffiliation, moderator, role, none, _ServiceAf) when TAffiliation /= owner -> true; +can_change_ra(owner, subscriber, TAffiliation, + moderator, role, none, _ServiceAf) + when TAffiliation /= owner -> + true; can_change_ra(admin, moderator, TAffiliation, moderator, role, none, _ServiceAf) when (TAffiliation /= owner) and (TAffiliation /= admin) -> true; +can_change_ra(admin, subscriber, TAffiliation, + moderator, role, none, _ServiceAf) + when (TAffiliation /= owner) and + (TAffiliation /= admin) -> + true; can_change_ra(_FAffiliation, _FRole, _TAffiliation, _TRole, role, _Value, _ServiceAf) -> false.