# HG changeset patch # User Matthew Wild # Date 1580162959 0 # Node ID c9e1cb7a38b85022db7a61a0f861316ca9a2aa47 # Parent d1cc6af0fb974fe92b0f1dd63712ee250487d071 usermanager: Load authz providers on components also diff -r d1cc6af0fb97 -r c9e1cb7a38b8 core/usermanager.lua --- a/core/usermanager.lua Mon Jan 27 21:54:59 2020 +0000 +++ b/core/usermanager.lua Mon Jan 27 22:09:19 2020 +0000 @@ -55,6 +55,12 @@ 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 @@ 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);