Changeset

5334:da7857891eb8

MUC: Fix affiliation check for admins, and bring it in line with the spec (thanks Maranda).
author Waqas Hussain <waqas20@gmail.com>
date Tue, 26 Feb 2013 20:31:41 +0500
parents 5333:760c345dc7a1
children 5335:bb81c13d2c6f
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Tue Feb 26 19:41:52 2013 +0500
+++ b/plugins/muc/muc.lib.lua	Tue Feb 26 20:31:41 2013 +0500
@@ -987,7 +987,7 @@
 			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