]> granicus.if.org Git - ejabberd/commitdiff
Allow a subscribed owner/admin to kick lower-affiliation moderator
authorBadlop <badlop@process-one.net>
Tue, 25 Sep 2018 08:43:38 +0000 (10:43 +0200)
committerBadlop <badlop@process-one.net>
Tue, 25 Sep 2018 08:55:57 +0000 (10:55 +0200)
src/mod_muc_room.erl

index bc4b0a05b73ad825ae488dae5db834e2ee561a37..ede3c8ebb8b22b493362da3997de80a8fb6f522e 100644 (file)
@@ -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.