From 50cc22c9e68aa62a529bf62553dc2f0739f3d0a2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 7 Sep 2010 20:19:52 +0100 Subject: Fix Simian regression --- .../SimianUserAccountServiceConnector.cs | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index deb8695..694aa72 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -73,7 +73,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public SimianUserAccountServiceConnector(IConfigSource source) { - Initialise(source); + CommonInit(source); } public void Initialise(IConfigSource source) @@ -83,24 +83,27 @@ namespace OpenSim.Services.Connectors.SimianGrid { string name = moduleConfig.GetString("UserAccountServices", ""); if (name == Name) - { - IConfig gridConfig = source.Configs["UserAccountService"]; - if (gridConfig != null) - { - string serviceUrl = gridConfig.GetString("UserAccountServerURI"); - if (!String.IsNullOrEmpty(serviceUrl)) - { - if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) - serviceUrl = serviceUrl + '/'; - m_serverUrl = serviceUrl; - m_Enabled = true; - } - } + CommonInit(source); + } + } - if (String.IsNullOrEmpty(m_serverUrl)) - m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector"); + private void CommonInit(IConfigSource source) + { + IConfig gridConfig = source.Configs["UserAccountService"]; + if (gridConfig != null) + { + string serviceUrl = gridConfig.GetString("UserAccountServerURI"); + if (!String.IsNullOrEmpty(serviceUrl)) + { + if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) + serviceUrl = serviceUrl + '/'; + m_serverUrl = serviceUrl; + m_Enabled = true; } } + + if (String.IsNullOrEmpty(m_serverUrl)) + m_log.Info("[SIMIAN ACCOUNT CONNECTOR]: No UserAccountServerURI specified, disabling connector"); } public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) -- cgit v1.1 From 50b03d08a8cdec9359adcece5b4645a6dc821d26 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 4 Oct 2010 00:04:42 +0200 Subject: Add linden prim renderer and update libOMV --- .../Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index ddd2322..9c150ee 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -147,7 +147,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (account == null) { // Store null responses too, to avoid repeated lookups for missing accounts - m_accountCache.AddOrUpdate(userID, null, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); + m_accountCache.AddOrUpdate(userID, null, CACHE_EXPIRATION_SECONDS); } return account; @@ -225,7 +225,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (success) { // Cache the user account info - m_accountCache.AddOrUpdate(data.PrincipalID, data, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); + m_accountCache.AddOrUpdate(data.PrincipalID, data, CACHE_EXPIRATION_SECONDS); } else { @@ -290,7 +290,7 @@ namespace OpenSim.Services.Connectors.SimianGrid GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); // Cache the user account info - m_accountCache.AddOrUpdate(account.PrincipalID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); + m_accountCache.AddOrUpdate(account.PrincipalID, account, CACHE_EXPIRATION_SECONDS); return account; } -- cgit v1.1 From ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 25 Nov 2010 20:34:55 +0100 Subject: Add the ability for gods to impersonate users. For this, bit 6 needs to be set in the target's UserFlags and the impersonator must have UserLevel 200 or above. The user can then log in using the target's name and their own password. --- .../Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 9c150ee..394c2b7 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -191,6 +191,11 @@ namespace OpenSim.Services.Connectors.SimianGrid return accounts; } + public List GetUserAccountsWhere(UUID scopeID, string query) + { + return null; + } + public bool StoreUserAccount(UserAccount data) { m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account for " + data.Name); -- cgit v1.1