diff options
author | Justin Clark-Casey (justincc) | 2012-03-19 22:45:03 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-03-19 22:49:14 +0000 |
commit | e861b4531355f2df4b5f71f2956f92e09b03b9f1 (patch) | |
tree | 8d74ac24a506794d8cf0645d299b318327b36492 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs | |
parent | Stop console command "xengine status" throwing an exception if there are no s... (diff) | |
download | opensim-SC_OLD-e861b4531355f2df4b5f71f2956f92e09b03b9f1.zip opensim-SC_OLD-e861b4531355f2df4b5f71f2956f92e09b03b9f1.tar.gz opensim-SC_OLD-e861b4531355f2df4b5f71f2956f92e09b03b9f1.tar.bz2 opensim-SC_OLD-e861b4531355f2df4b5f71f2956f92e09b03b9f1.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs | 9 |
1 files changed, 2 insertions, 7 deletions
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 | |||
93 | 93 | ||
94 | scene.RegisterModuleInterface<IAuthorizationService>(this); | 94 | scene.RegisterModuleInterface<IAuthorizationService>(this); |
95 | m_Scene = scene; | 95 | m_Scene = scene; |
96 | |||
97 | scene.EventManager.OnLoginsEnabled += new EventManager.LoginsEnabled(OnLoginsEnabled); | ||
98 | } | 96 | } |
99 | 97 | ||
100 | public void RemoveRegion(Scene scene) | 98 | public void RemoveRegion(Scene scene) |
@@ -106,16 +104,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
106 | if (!m_Enabled) | 104 | if (!m_Enabled) |
107 | return; | 105 | return; |
108 | 106 | ||
107 | m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene); | ||
108 | |||
109 | m_log.InfoFormat( | 109 | m_log.InfoFormat( |
110 | "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}", | 110 | "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}", |
111 | scene.RegionInfo.RegionName); | 111 | scene.RegionInfo.RegionName); |
112 | } | 112 | } |
113 | 113 | ||
114 | private void OnLoginsEnabled(string regionName) | ||
115 | { | ||
116 | m_AuthorizationService = new AuthorizationService(m_AuthorizationConfig, m_Scene); | ||
117 | } | ||
118 | |||
119 | public bool IsAuthorizedForRegion( | 114 | public bool IsAuthorizedForRegion( |
120 | string userID, string firstName, string lastName, string regionID, out string message) | 115 | string userID, string firstName, string lastName, string regionID, out string message) |
121 | { | 116 | { |