aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2013-02-26 20:31:41 +0500
committerWaqas Hussain <waqas20@gmail.com>2013-02-26 20:31:41 +0500
commitf593ba0c191678898c32ffac249061af96dd47c8 (patch)
tree74efe080ad4cb19edf598538758a49217b0cdbf2 /plugins
parentdb6081d6e073cb625b280397e6b73808f7476a92 (diff)
downloadprosody-f593ba0c191678898c32ffac249061af96dd47c8.tar.gz
prosody-f593ba0c191678898c32ffac249061af96dd47c8.zip
MUC: Fix affiliation check for admins, and bring it in line with the spec (thanks Maranda).
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 16a0238d..a48c9935 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -987,7 +987,7 @@ function room_mt:set_affiliation(actor, jid, affiliation, callback, reason)
return true;
end
if actor_affiliation ~= "owner" then
- if actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then
+ if affiliation == "owner" or affiliation == "admin" or actor_affiliation ~= "admin" or target_affiliation == "owner" or target_affiliation == "admin" then
return nil, "cancel", "not-allowed";
end
elseif target_affiliation == "owner" and jid_bare(actor) == jid then -- self change