From e2b1c569dad47d1b41186f22b351aa15ed3787eb Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 19 Mar 2012 22:45:03 +0000 Subject: [PATCH] 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(-) diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs index c982db61fc..267fb9ead9 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) {