diff options
author | Justin Clarke Casey | 2009-05-05 16:45:21 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-05-05 16:45:21 +0000 |
commit | f8e0653e73932bae20f483e0ce669f1623c6ff1e (patch) | |
tree | 9fc902fc17567755bad28f0f6d88b7089c0365e1 /OpenSim/Region/CoreModules | |
parent | - moving banned check and public/private check to (diff) | |
download | opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.zip opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.tar.gz opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.tar.bz2 opensim-SC-f8e0653e73932bae20f483e0ce669f1623c6ff1e.tar.xz |
* If an item creator id contains an iar loaded name, create a temporary profile and hashed UUID to represent the user
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index bf3097a..b0c1d0b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -157,9 +157,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
157 | // Don't use the item ID that's in the file | 157 | // Don't use the item ID that's in the file |
158 | item.ID = UUID.Random(); | 158 | item.ID = UUID.Random(); |
159 | 159 | ||
160 | string ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); | 160 | UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); |
161 | if (null != ospResolvedId) | 161 | if (UUID.Zero != ospResolvedId) |
162 | item.CreatorId = ospResolvedId; | 162 | item.CreatorIdAsUuid = ospResolvedId; |
163 | 163 | ||
164 | item.Owner = m_userInfo.UserProfile.ID; | 164 | item.Owner = m_userInfo.UserProfile.ID; |
165 | 165 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 274e329..4c6045a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -253,7 +253,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
253 | = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); | 253 | = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); |
254 | InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); | 254 | InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); |
255 | 255 | ||
256 | Assert.That(foundItem.CreatorId, Is.EqualTo(user2Uuid.ToString())); | 256 | Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId)); |
257 | Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid)); | ||
257 | Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); | 258 | Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); |
258 | 259 | ||
259 | Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); | 260 | Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); |
@@ -321,8 +322,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
321 | = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); | 322 | = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); |
322 | InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); | 323 | InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); |
323 | 324 | ||
324 | Assert.That(foundItem.CreatorId, Is.EqualTo(user2Profile.ID.ToString())); | 325 | Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId)); |
325 | Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); | 326 | Assert.That( |
327 | foundItem.CreatorIdAsUuid, Is.EqualTo(OspResolver.HashName(user2FirstName + " " + user2LastName))); | ||
328 | Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); | ||
326 | 329 | ||
327 | Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod()); | 330 | Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod()); |
328 | } | 331 | } |