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
commit0db5373bfc837f667252b925aefc39d00a90c937 (patch)
tree74efe080ad4cb19edf598538758a49217b0cdbf2 /plugins
parentb9e7f08143c34747247b7f122b3ff1137f7f567d (diff)
downloadprosody-0db5373bfc837f667252b925aefc39d00a90c937.tar.gz
prosody-0db5373bfc837f667252b925aefc39d00a90c937.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