]> granicus.if.org Git - ejabberd/commitdiff
Do not decrease MUC admin's role/affiliation
authorjabber <jabber@kuku.jabber.ru>
Sun, 17 Apr 2011 15:03:07 +0000 (19:03 +0400)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Mon, 18 Apr 2011 11:06:05 +0000 (21:06 +1000)
src/mod_muc/mod_muc_room.erl

index bf60f72e586a40c724e4d7002e6a6b786f39d710..f5a1f4a4e06d7859a78fe66f8765d77fd92aefbf 100644 (file)
@@ -2519,6 +2519,11 @@ can_change_ra(_FAffiliation, _FRole,
     %% A room owner tries to add as persistent owner a
     %% participant that is already owner because he is MUC admin
     true;
+can_change_ra(_FAffiliation, _FRole,
+              _TAffiliation, _TRole,
+              _RoleorAffiliation, _Value, owner) ->
+    %% Nobody can decrease MUC admin's role/affiliation
+    false;
 can_change_ra(_FAffiliation, _FRole,
              TAffiliation, _TRole,
              affiliation, Value, _ServiceAf)