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
0.7.3-post-fixes
Justin Clark-Casey (justincc) 2012-03-19 22:45:03 +00:00
parent cf91ac68b6
commit e861b45313
1 changed files with 2 additions and 7 deletions

View File

@ -93,8 +93,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
scene.RegisterModuleInterface<IAuthorizationService>(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)
{