# HG changeset patch # User Waqas Hussain # Date 1277332251 -18000 # Node ID c06b3f7c92b11089c511c3c0b2fa77cd44d8d330 # Parent 1eec2bd19bf7e18fc664423f7437baf7ec7d37e2 mod_auth_anonymous, mod_auth_cyrus: Removed is_admin(), as usermanager already has a default. diff -r 1eec2bd19bf7 -r c06b3f7c92b1 plugins/mod_auth_anonymous.lua --- a/plugins/mod_auth_anonymous.lua Thu Jun 24 03:29:39 2010 +0500 +++ b/plugins/mod_auth_anonymous.lua Thu Jun 24 03:30:51 2010 +0500 @@ -25,7 +25,7 @@ function provider.get_password(username) return nil, "Password not available."; end - + function provider.set_password(username, password) return nil, "Password based auth not supported."; end @@ -48,18 +48,6 @@ return new_sasl(realm, anonymous_authentication_profile); end - function provider.is_admin(jid) - local admins = config.get(host, "core", "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 - elseif admins then - log("error", "Option 'admins' for host '%s' is not a table", host); - end - return is_admin(jid); -- Test whether it's a global admin instead - end return provider; end diff -r 1eec2bd19bf7 -r c06b3f7c92b1 plugins/mod_auth_cyrus.lua --- a/plugins/mod_auth_cyrus.lua Thu Jun 24 03:29:39 2010 +0500 +++ b/plugins/mod_auth_cyrus.lua Thu Jun 24 03:30:51 2010 +0500 @@ -58,18 +58,6 @@ return new_sasl(realm); end - function provider.is_admin(jid) - local admins = config.get(host, "core", "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 - elseif admins then - log("error", "Option 'admins' for host '%s' is not a table", host); - end - return is_admin(jid); -- Test whether it's a global admin instead - end return provider; end