aboutsummaryrefslogtreecommitdiffstats
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
commitb177628d3c336437b7098935b2e1040dc254e46a (patch)
tree00e863e7337782f41df93d780f452ffa9cc7347c
parent1f437623ad987328bcd6ca34b551f14415985b32 (diff)
downloadprosody-b177628d3c336437b7098935b2e1040dc254e46a.tar.gz
prosody-b177628d3c336437b7098935b2e1040dc254e46a.zip
usermanager: Load authz providers on components also
-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);