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