HG: normalize all externalized user ULRs to be the Home URL, i.e. the location of the user's UAS. This corrects an earlier design which had some cases pointing to the profile server. WARNING: CONFIGURATION CHANGES in both the sims (*Common.ini) and the Robust configs (Robust.HG.ini). Please check diff of the example files, but basically all vars that were pointing to profile should point to the UAS instead and should be called HomeURI.

This commit is contained in:
Diva Canto
2012-01-12 09:56:35 -08:00
parent 34137ed4ea
commit 8bdd80abfa
11 changed files with 46 additions and 33 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenSim.Services.HypergridService
LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType);
private string m_ProfileServiceURL;
private string m_HomeURL;
private IUserAccountService m_UserAccountService;
private UserAccountCache m_Cache;
@@ -74,7 +74,10 @@ namespace OpenSim.Services.HypergridService
if (m_UserAccountService == null)
throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
m_ProfileServiceURL = assetConfig.GetString("ProfileServerURI", string.Empty);
// legacy configuration [obsolete]
m_HomeURL = assetConfig.GetString("ProfileServerURI", string.Empty);
// Preferred
m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL);
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
}
@@ -134,13 +137,13 @@ namespace OpenSim.Services.HypergridService
UserAccount creator = m_Cache.GetUser(meta.CreatorID);
if (creator != null)
meta.CreatorID = m_ProfileServiceURL + "/" + meta.CreatorID + ";" + creator.FirstName + " " + creator.LastName;
meta.CreatorID = meta.CreatorID + ";" + m_HomeURL + "/" + creator.FirstName + " " + creator.LastName;
}
protected byte[] AdjustIdentifiers(byte[] data)
{
string xml = Utils.BytesToString(data);
return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, m_ProfileServiceURL, m_Cache, UUID.Zero));
return Utils.StringToBytes(ExternalRepresentationUtils.RewriteSOP(xml, m_HomeURL, m_Cache, UUID.Zero));
}
}

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Services.HypergridService
protected new IXInventoryData m_Database;
private string m_ProfileServiceURL;
private string m_HomeURL;
private IUserAccountService m_UserAccountService;
private UserAccountCache m_Cache;
@@ -100,7 +100,10 @@ namespace OpenSim.Services.HypergridService
if (m_UserAccountService == null)
throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
m_ProfileServiceURL = invConfig.GetString("ProfileServerURI", string.Empty);
// legacy configuration [obsolete]
m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty);
// Preferred
m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL);
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
}
@@ -321,7 +324,7 @@ namespace OpenSim.Services.HypergridService
// Adjust the creator data
if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty))
it.CreatorData = m_ProfileServiceURL + "/" + it.CreatorId + ";" + user.FirstName + " " + user.LastName;
it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName;
return it;
}