From e861b4531355f2df4b5f71f2956f92e09b03b9f1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 19 Mar 2012 22:45:03 +0000 Subject: Fix a bug where logins to standalones would fail if the RegionReady module was not active Unfortunately, the OnLoginsEnabled event is currently only guaranteed to fire if the RegionReady module is active. However, we can instantiate the AuthorizationService in the module RegionLoaded method since by this time all other modules will have been loaded --- .../Authorization/LocalAuthorizationServiceConnector.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs index c982db6..267fb9e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs @@ -93,8 +93,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization scene.RegisterModuleInterface(this); m_Scene = scene; - - scene.EventManager.OnLoginsEnabled += new EventManager.LoginsEnabled(OnLoginsEnabled); } public void RemoveRegion(Scene scene) @@ -106,16 +104,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization if (!m_Enabled) return; + m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene); + m_log.InfoFormat( "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}", scene.RegionInfo.RegionName); } - private void OnLoginsEnabled(string regionName) - { - m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene); - } - public bool IsAuthorizedForRegion( string userID, string firstName, string lastName, string regionID, out string message) { -- cgit v1.1