# HG changeset patch # User Matthew Wild # Date 1376418907 -3600 # Node ID 40f7a8d152eb0194682b3444f0cead0381aaedd9 # Parent 61f95bf51b351df310a5dcbab6b8f7a1bfef0812 mod_auth_external: Remove is_admin (duplicates usermanager) diff -r 61f95bf51b35 -r 40f7a8d152eb 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);