# HG changeset patch # User Kim Alvefur # Date 1435247904 -7200 # Node ID adf2fdf1264a97ae5e1a8ec9c951774e255f91b2 # Parent 6efeb801d62f67f0da9578199816f4573845fcaf MUC: Prevent admins from being given affiliatons other than owner diff -r 6efeb801d62f -r adf2fdf1264a plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Thu Jun 25 17:54:19 2015 +0200 +++ b/plugins/muc/mod_muc.lua Thu Jun 25 17:58:24 2015 +0200 @@ -51,7 +51,7 @@ 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