aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commit48c1abdc57ae3ab5dfe5df027d2476445f13da02 (patch)
tree9ff1be11633a78f7390851364ab907b526e3c4bd /plugins
parent3c7887b6fb11315656dd1a6febd41155f0e48217 (diff)
downloadprosody-48c1abdc57ae3ab5dfe5df027d2476445f13da02.tar.gz
prosody-48c1abdc57ae3ab5dfe5df027d2476445f13da02.zip
MUC: Prevent admins from being given affiliatons other than owner
Diffstat (limited to 'plugins')
-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