aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/mod_muc.lua
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
commitb351da9b5f552145c3d9bab7a5e44b4c4936e78e (patch)
tree9ff1be11633a78f7390851364ab907b526e3c4bd /plugins/muc/mod_muc.lua
parentb06954c6553490c76f1098512a33b57af2e35459 (diff)
downloadprosody-b351da9b5f552145c3d9bab7a5e44b4c4936e78e.tar.gz
prosody-b351da9b5f552145c3d9bab7a5e44b4c4936e78e.zip
MUC: Prevent admins from being given affiliatons other than owner
Diffstat (limited to 'plugins/muc/mod_muc.lua')
-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