Software /
code /
prosody
Changeset
13621:eb676b6f05e3
mod_authz_internal: Make host considered the parent configurable
This bestows the role specified by the 'host_user_role' setting onto
users of that host. For simplicity, only a single host can be specified.
Making it configurable allows for setups where VirtualHost and related
Components may be siblings instead of having a subdomain relationship.
For setups with many VirtualHosts sharing a single Component, the
'server_user_role' setting is more appropriate. Even more complicated
setups would have to resort to mod_firewall or similar.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 13 Jan 2025 11:50:03 +0100 |
parents | 13620:7b632cd0e00d |
children | 13622:4e908958660e |
files | plugins/mod_authz_internal.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_authz_internal.lua Fri Jan 10 12:34:29 2025 +0100 +++ b/plugins/mod_authz_internal.lua Mon Jan 13 11:50:03 2025 +0100 @@ -8,7 +8,7 @@ local config_global_admin_jids = module:context("*"):get_option_set("admins", {}) / normalize; local config_admin_jids = module:get_option_inherited_set("admins", {}) / normalize; local host = module.host; -local host_suffix = host:gsub("^[^%.]+%.", ""); +local host_suffix = module:get_option_string("parent_host", (host:gsub("^[^%.]+%.", ""))); local hosts = prosody.hosts; local is_anon_host = module:get_option_string("authentication") == "anonymous";