mod_auth_internal, mod_auth_internal_hashed: Remove is_admin method from providers

Tue, 22 Jun 2010 19:14:55 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 22 Jun 2010 19:14:55 +0100
changeset 3287
e425e27c12be
parent 3286
e5234625fc42
child 3288
1a84d7d6f667

mod_auth_internal, mod_auth_internal_hashed: Remove is_admin method from providers

plugins/mod_auth_internal.lua file | annotate | diff | comparison | revisions
plugins/mod_auth_internal_hashed.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_auth_internal.lua	Tue Jun 22 19:04:10 2010 +0100
+++ b/plugins/mod_auth_internal.lua	Tue Jun 22 19:14:55 2010 +0100
@@ -93,16 +93,7 @@
 		};
 		return new_sasl(realm, getpass_authentication_profile);
 	end
-
-	function provider.is_admin(jid)
-		local admins = module:get_option_array("admins");
-		if admins ~= config.get("*", "core", "admins") and type(admins) == "table" then
-			jid = jid_bare(jid);
-			for _,admin in ipairs(admins) do
-				if admin == jid then return true; end
-			end
-		end
-	end
+	
 	return provider;
 end
 
--- a/plugins/mod_auth_internal_hashed.lua	Tue Jun 22 19:04:10 2010 +0100
+++ b/plugins/mod_auth_internal_hashed.lua	Tue Jun 22 19:14:55 2010 +0100
@@ -151,16 +151,7 @@
 		};
 		return new_sasl(realm, testpass_authentication_profile);
 	end
-
-	function provider.is_admin(jid)
-		local admins = module:get_option_array("admins");
-		if admins ~= config.get("*", "core", "admins") and type(admins) == "table" then
-			jid = jid_bare(jid);
-			for _,admin in ipairs(admins) do
-				if admin == jid then return true; end
-			end
-		end
-	end
+	
 	return provider;
 end
 

mercurial