Mercurial > prosody-hg
comparison plugins/mod_auth_internal_hashed.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 | 342fd8f8ccd9 |
| children | 1a84d7d6f667 |
comparison
equal
deleted
inserted
replaced
| 3286:e5234625fc42 | 3287:e425e27c12be |
|---|---|
| 149 return stored_key, server_key, iteration_count, salt, true; | 149 return stored_key, server_key, iteration_count, salt, true; |
| 150 end | 150 end |
| 151 }; | 151 }; |
| 152 return new_sasl(realm, testpass_authentication_profile); | 152 return new_sasl(realm, testpass_authentication_profile); |
| 153 end | 153 end |
| 154 | 154 |
| 155 function provider.is_admin(jid) | |
| 156 local admins = module:get_option_array("admins"); | |
| 157 if admins ~= config.get("*", "core", "admins") and type(admins) == "table" then | |
| 158 jid = jid_bare(jid); | |
| 159 for _,admin in ipairs(admins) do | |
| 160 if admin == jid then return true; end | |
| 161 end | |
| 162 end | |
| 163 end | |
| 164 return provider; | 155 return provider; |
| 165 end | 156 end |
| 166 | 157 |
| 167 module:add_item("auth-provider", new_hashpass_provider(module.host)); | 158 module:add_item("auth-provider", new_hashpass_provider(module.host)); |
| 168 | 159 |
