aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-24 03:30:51 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-24 03:30:51 +0500
commit05a99f5ef1f8e965357ac451cb3c87e9bb64aa3c (patch)
tree8c8247a746d4371aad85fec6b5136c8906a7eadc /plugins
parent0b720ffe35edf797b9c58c21b4e4c40add512c30 (diff)
downloadprosody-05a99f5ef1f8e965357ac451cb3c87e9bb64aa3c.tar.gz
prosody-05a99f5ef1f8e965357ac451cb3c87e9bb64aa3c.zip
mod_auth_anonymous, mod_auth_cyrus: Removed is_admin(), as usermanager already has a default.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_anonymous.lua14
-rw-r--r--plugins/mod_auth_cyrus.lua12
2 files changed, 1 insertions, 25 deletions
diff --git a/plugins/mod_auth_anonymous.lua b/plugins/mod_auth_anonymous.lua
index 96f95b3e..b2cdfef5 100644
--- a/plugins/mod_auth_anonymous.lua
+++ b/plugins/mod_auth_anonymous.lua
@@ -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
diff --git a/plugins/mod_auth_cyrus.lua b/plugins/mod_auth_cyrus.lua
index 8ffc27e9..637773d3 100644
--- a/plugins/mod_auth_cyrus.lua
+++ b/plugins/mod_auth_cyrus.lua
@@ -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