Software /
code /
prosody
File
plugins/mod_authz_config.lua @ 10635:675d9fbcbaed
mod_authz_internal, usermanager: Rename to mod_authz_config
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 27 Jan 2020 22:28:52 +0000 |
parent | 10633:plugins/mod_authz_internal.lua@d1cc6af0fb97 |
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