Mercurial > prosody-hg
comparison plugins/mod_auth_internal.lua @ 3287:e425e27c12be
mod_auth_internal, mod_auth_internal_hashed: Remove is_admin method from providers
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 22 Jun 2010 19:14:55 +0100 |
| parents | 5ad2710d7bb8 |
| children | f13306ce3417 |
comparison
equal
deleted
inserted
replaced
| 3286:e5234625fc42 | 3287:e425e27c12be |
|---|---|
| 91 return password, true; | 91 return password, true; |
| 92 end | 92 end |
| 93 }; | 93 }; |
| 94 return new_sasl(realm, getpass_authentication_profile); | 94 return new_sasl(realm, getpass_authentication_profile); |
| 95 end | 95 end |
| 96 | 96 |
| 97 function provider.is_admin(jid) | |
| 98 local admins = module:get_option_array("admins"); | |
| 99 if admins ~= config.get("*", "core", "admins") and type(admins) == "table" then | |
| 100 jid = jid_bare(jid); | |
| 101 for _,admin in ipairs(admins) do | |
| 102 if admin == jid then return true; end | |
| 103 end | |
| 104 end | |
| 105 end | |
| 106 return provider; | 97 return provider; |
| 107 end | 98 end |
| 108 | 99 |
| 109 module:add_item("auth-provider", new_default_provider(module.host)); | 100 module:add_item("auth-provider", new_default_provider(module.host)); |
| 110 | 101 |
