aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-06-25 17:58:24 +0200
committerKim Alvefur <zash@zash.se>2015-06-25 17:58:24 +0200
commitd3ff677ce8be30231ee116bdde22633fe89c3bd3 (patch)
tree9ff1be11633a78f7390851364ab907b526e3c4bd
parentff6a3b3aded5efed20e3fb42cd76a3c59460874d (diff)
downloadprosody-d3ff677ce8be30231ee116bdde22633fe89c3bd3.tar.gz
prosody-d3ff677ce8be30231ee116bdde22633fe89c3bd3.zip
MUC: Prevent admins from being given affiliatons other than owner
-rw-r--r--plugins/muc/mod_muc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 6e86ab73..acc2da0d 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -51,7 +51,7 @@ function muclib.room_mt:get_affiliation(jid)
return _get_affiliation(self, jid);
end
function muclib.room_mt:set_affiliation(actor, jid, affiliation, callback, reason)
- if is_admin(jid) then return nil, "modify", "not-acceptable"; end
+ if affiliation ~= "owner" and is_admin(jid) then return nil, "modify", "not-acceptable"; end
return _set_affiliation(self, actor, jid, affiliation, callback, reason);
end