diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-04-14 17:54:33 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-04-14 17:54:33 +0500 |
commit | fe97859d274301e014cf8fc137cb8688075cc195 (patch) | |
tree | 3c043823ef944db9deaf09ad9b1274017fa418f0 /plugins | |
parent | 6778955731063d37b1de314384f002ce4509fd2e (diff) | |
download | prosody-fe97859d274301e014cf8fc137cb8688075cc195.tar.gz prosody-fe97859d274301e014cf8fc137cb8688075cc195.zip |
MUC: Allow moderators which are not owners to change roles.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 1ec2349a..75289cc1 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -673,7 +673,7 @@ end function room_mt:set_role(actor, occupant_jid, role, callback, reason) if role == "none" then role = nil; end if role and role ~= "moderator" and role ~= "participant" and role ~= "visitor" then return nil, "modify", "not-acceptable"; end - if self:get_affiliation(actor) ~= "owner" then return nil, "cancel", "not-allowed"; end + if self:get_role(self._jid_nick[actor]) ~= "moderator" then return nil, "cancel", "not-allowed"; end local occupant = self._occupants[occupant_jid]; if not occupant then return nil, "modify", "not-acceptable"; end if occupant.affiliation == "owner" or occupant.affiliation == "admin" then return nil, "cancel", "not-allowed"; end |