aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-09-07 20:31:35 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-09-07 20:31:35 +0500
commit4367314a543155e9eb1b43800d62be126944b38e (patch)
treeadac21cfad17d5ab69373d419c6406fcda3dd253 /plugins/muc/muc.lib.lua
parent58698971d7873d889668b0da7f1cce764c74a0d9 (diff)
downloadprosody-4367314a543155e9eb1b43800d62be126944b38e.tar.gz
prosody-4367314a543155e9eb1b43800d62be126944b38e.zip
MUC: An admin or owner MUST NOT be able to revoke moderation privileges from another admin or owner.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
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();