mod_auth_external: Remove is_admin (duplicates usermanager)
authorMatthew Wild <mwild1@gmail.com>
Tue, 13 Aug 2013 19:35:07 +0100
changeset 1155 40f7a8d152eb
parent 1154 61f95bf51b35
child 1156 3c82984ffa51
mod_auth_external: Remove is_admin (duplicates usermanager)
mod_auth_external/mod_auth_external.lua
--- a/mod_auth_external/mod_auth_external.lua	Tue Aug 13 18:56:50 2013 +0100
+++ b/mod_auth_external/mod_auth_external.lua	Tue Aug 13 19:35:07 2013 +0100
@@ -104,19 +104,4 @@
 	return new_sasl(host, testpass_authentication_profile);
 end
 
-function provider.is_admin(jid)
-	local admins = config.get(host, "core", "admins");
-	if admins ~= config.get("*", "core", "admins") then
-		if type(admins) == "table" then
-			jid = jid_bare(jid);
-			for _,admin in ipairs(admins) do
-				if admin == jid then return true; end
-			end
-		elseif admins then
-			log("error", "Option 'admins' for host '%s' is not a table", host);
-		end
-	end
-	return usermanager.is_admin(jid); -- Test whether it's a global admin instead
-end
-
 module:provides("auth", provider);