From b351da9b5f552145c3d9bab7a5e44b4c4936e78e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 25 Jun 2015 17:58:24 +0200 Subject: MUC: Prevent admins from being given affiliatons other than owner --- plugins/muc/mod_muc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.3