Mercurial > prosody-hg
view plugins/mod_authz_config.lua @ 10658:52c6dfa04dba
mod_admin_telnet: Fix host selection filter, fixes loading on components
get_hosts_with_module(a component, mod) would still filter out
components since they don't have type="component" instead of "local"
Introduced in 4d3549e64489
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 22 Feb 2020 18:32:50 +0100 |
| parents | 675d9fbcbaed |
| children |
line wrap: on
line source
local normalize = require "util.jid".prep; local admin_jids = module:get_option_inherited_set("admins", {}) / normalize; local host = module.host; local admin_role = { ["prosody:admin"] = true }; function get_user_roles(user) return get_jid_roles(user.."@"..host); end function get_jid_roles(jid) if admin_jids:contains(jid) then return admin_role; end return nil; end
