aboutsummaryrefslogtreecommitdiffstats
path: root/core/usermanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-01-27 22:09:19 +0000
committerMatthew Wild <mwild1@gmail.com>2020-01-27 22:09:19 +0000
commite4fad868df95526bb0637457559fca9ef80426a6 (patch)
tree00e863e7337782f41df93d780f452ffa9cc7347c /core/usermanager.lua
parent15b310c4e2cca25059b1ac274e29a96a957400ba (diff)
downloadprosody-e4fad868df95526bb0637457559fca9ef80426a6.tar.gz
prosody-e4fad868df95526bb0637457559fca9ef80426a6.zip
usermanager: Load authz providers on components also
Diffstat (limited to 'core/usermanager.lua')
-rw-r--r--core/usermanager.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index ec98d12f..47d157bf 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -55,6 +55,12 @@ local provider_mt = { __index = new_null_provider() };
local function initialize_host(host)
local host_session = hosts[host];
+
+ local authz_provider_name = config.get(host, "authorization") or "internal";
+
+ local authz_mod = modulemanager.load(host, "authz_"..authz_provider_name);
+ host_session.authz = authz_mod or global_authz_provider;
+
if host_session.type ~= "local" then return; end
host_session.events.add_handler("item-added/auth-provider", function (event)
@@ -84,10 +90,6 @@ local function initialize_host(host)
modulemanager.load(host, "auth_"..auth_provider);
end
- local authz_provider_name = config.get(host, "authorization") or "internal";
-
- local authz_mod = modulemanager.load(host, "authz_"..authz_provider_name);
- host_session.authz = authz_mod or global_authz_provider;
end;
prosody.events.add_handler("host-activated", initialize_host, 100);