mod_auth_anonymous, mod_auth_cyrus: Removed is_admin(), as usermanager already has...
authorWaqas Hussain <waqas20@gmail.com>
Wed, 23 Jun 2010 22:30:51 +0000 (03:30 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Wed, 23 Jun 2010 22:30:51 +0000 (03:30 +0500)
plugins/mod_auth_anonymous.lua
plugins/mod_auth_cyrus.lua

index 96f95b3e84ab0a6d72735fe8537fb61655569289..b2cdfef50626b294dc98d1c41893dde10e9a6da0 100644 (file)
@@ -25,7 +25,7 @@ function new_default_provider(host)
        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 @@ function new_default_provider(host)
                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
 
index 8ffc27e968798d92e95aadba36c39b6c0e574eab..637773d39199a781a6a30ddc6b7c9d1d70fef5c7 100644 (file)
@@ -58,18 +58,6 @@ function new_default_provider(host)
                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