diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-09-29 12:46:02 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-09-29 12:46:02 +0100 |
commit | 5ed7f1638c35b0a77f6a6a015326846a8aa0fac2 (patch) | |
tree | e6482e6a0cb2f7b7376b8116ca0efe6e39acdb9c /plugins | |
parent | 53ccf68cdf32f6cc26417305c54246bdd60ec49b (diff) | |
download | prosody-5ed7f1638c35b0a77f6a6a015326846a8aa0fac2.tar.gz prosody-5ed7f1638c35b0a77f6a6a015326846a8aa0fac2.zip |
mod_authz_internal: Allow specifying default role for public (remote) users
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_authz_internal.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_authz_internal.lua b/plugins/mod_authz_internal.lua index f7995cdd..66aa02c1 100644 --- a/plugins/mod_authz_internal.lua +++ b/plugins/mod_authz_internal.lua @@ -16,6 +16,7 @@ local host_user_role, server_user_role; if is_component then host_user_role = module:get_option_string("host_user_role", "prosody:user"); server_user_role = module:get_option_string("server_user_role"); + public_user_role = module:get_option_string("public_user_role"); end local role_store = module:open_store("account_roles"); @@ -240,6 +241,8 @@ function get_jid_role(jid) return role_registry[host_user_role]; elseif server_user_role and hosts[user_host] then return role_registry[server_user_role]; + elseif public_user_role then + return role_registry[public_user_role]; end end return nil; |