Comparison

core/usermanager.lua @ 3612:5547acd18a9f

usermanager: Don't load auth modules for components.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 11 Nov 2010 08:36:31 +0500
parent 3608:ae0f83feaff4
child 3721:bd5c6c333ee7
comparison
equal deleted inserted replaced
3611:d58da6bb8a77 3612:5547acd18a9f
32 return setmetatable({name = "null", get_sasl_handler = dummy_get_sasl_handler}, { __index = function() return dummy; end }); 32 return setmetatable({name = "null", get_sasl_handler = dummy_get_sasl_handler}, { __index = function() return dummy; end });
33 end 33 end
34 34
35 function initialize_host(host) 35 function initialize_host(host)
36 local host_session = hosts[host]; 36 local host_session = hosts[host];
37 if host_session.type ~= "local" then return; end
38
37 host_session.events.add_handler("item-added/auth-provider", function (event) 39 host_session.events.add_handler("item-added/auth-provider", function (event)
38 local provider = event.item; 40 local provider = event.item;
39 local auth_provider = config.get(host, "core", "authentication") or default_provider; 41 local auth_provider = config.get(host, "core", "authentication") or default_provider;
40 if provider.name == auth_provider then 42 if provider.name == auth_provider then
41 host_session.users = provider; 43 host_session.users = provider;