From 4367314a543155e9eb1b43800d62be126944b38e Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 7 Sep 2009 20:31:35 +0500 Subject: MUC: An admin or owner MUST NOT be able to revoke moderation privileges from another admin or owner. --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 1a4bbc16..7133d133 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -454,7 +454,7 @@ function room_mt:set_role(actor, nick, role, callback) if self:get_affiliation(actor) ~= "owner" then return nil, "cancel", "not-allowed"; end local occupant = self._occupants[nick]; if not occupant then return nil, "modify", "not-acceptable"; end - if jid_bare(actor) == occupant.jid then return nil, "cancel", "not-allowed"; end + if occupant.affiliation == "owner" or occupant.affiliation == "admin" then return nil, "cancel", "not-allowed"; end local p = st.presence({from = nick, type = "unavailable"}) :tag("x", {xmlns = "http://jabber.org/protocol/muc#user"}) :tag("item", {affiliation=occupant.affiliation, nick=nick, role=role or "none"}):up(); -- cgit v1.2.3