aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2015-02-03 23:40:32 +0000
committerJustin Clark-Casey (justincc)2015-02-03 23:43:30 +0000
commit1d2616e7a24882b197de0db3d76c1e02a7cfcd90 (patch)
tree8ba2f006e029528345f1cb279ac0399ac52e9d90 /OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
parentcorrect some minor comment misspellings in last commit (diff)
downloadopensim-SC-1d2616e7a24882b197de0db3d76c1e02a7cfcd90.zip
opensim-SC-1d2616e7a24882b197de0db3d76c1e02a7cfcd90.tar.gz
opensim-SC-1d2616e7a24882b197de0db3d76c1e02a7cfcd90.tar.bz2
opensim-SC-1d2616e7a24882b197de0db3d76c1e02a7cfcd90.tar.xz
If the owner of an object is taking a copy from the scene (e.g. via the "take copy" option on a viewer) then only require owner copy perms, not copy and transfer.
This matches Linden Lab behaviour and what was already possible via shift-copy. Transfer would not apply here as the owner and copier are the same. This is the only functional change, all other current take copy logic remains the same. Adds regression tests around relevant take copy cases.
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs')
-rw-r--r--OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
index be3a0cb..2b272e6 100644
--- a/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/TestXInventoryDataPlugin.cs
@@ -46,20 +46,33 @@ namespace OpenSim.Tests.Common
46 46
47 public XInventoryItem[] GetItems(string[] fields, string[] vals) 47 public XInventoryItem[] GetItems(string[] fields, string[] vals)
48 { 48 {
49// Console.WriteLine(
50// "Requesting items, fields {0}, vals {1}", string.Join(", ", fields), string.Join(", ", vals));
51
49 List<XInventoryItem> origItems = Get<XInventoryItem>(fields, vals, m_allItems.Values.ToList()); 52 List<XInventoryItem> origItems = Get<XInventoryItem>(fields, vals, m_allItems.Values.ToList());
50 53
51 return origItems.Select(i => i.Clone()).ToArray(); 54 XInventoryItem[] items = origItems.Select(i => i.Clone()).ToArray();
55
56// Console.WriteLine("Found {0} items", items.Length);
57// Array.ForEach(items, i => Console.WriteLine("Found item {0} {1}", i.inventoryName, i.inventoryID));
58
59 return items;
52 } 60 }
53 61
54 public XInventoryFolder[] GetFolders(string[] fields, string[] vals) 62 public XInventoryFolder[] GetFolders(string[] fields, string[] vals)
55 { 63 {
56// Console.WriteLine( 64// Console.WriteLine(
57// "Requesting folders, fields {0}, vals {1}", string.Join(",", fields), string.Join(",", vals)); 65// "Requesting folders, fields {0}, vals {1}", string.Join(", ", fields), string.Join(", ", vals));
58 66
59 List<XInventoryFolder> origFolders 67 List<XInventoryFolder> origFolders
60 = Get<XInventoryFolder>(fields, vals, m_allFolders.Values.ToList()); 68 = Get<XInventoryFolder>(fields, vals, m_allFolders.Values.ToList());
61 69
62 return origFolders.Select(f => f.Clone()).ToArray(); 70 XInventoryFolder[] folders = origFolders.Select(f => f.Clone()).ToArray();
71
72// Console.WriteLine("Found {0} folders", folders.Length);
73// Array.ForEach(folders, f => Console.WriteLine("Found folder {0} {1}", f.folderName, f.folderID));
74
75 return folders;
63 } 76 }
64 77
65 public bool StoreFolder(XInventoryFolder folder) 78 public bool StoreFolder(XInventoryFolder folder)
@@ -75,7 +88,9 @@ namespace OpenSim.Tests.Common
75 { 88 {
76 m_allItems[item.inventoryID] = item.Clone(); 89 m_allItems[item.inventoryID] = item.Clone();
77 90
78// Console.WriteLine("Added item {0} {1}, creator {2}, owner {3}", item.inventoryName, item.inventoryID, item.creatorID, item.avatarID); 91// Console.WriteLine(
92// "Added item {0} {1}, folder {2}, creator {3}, owner {4}",
93// item.inventoryName, item.inventoryID, item.parentFolderID, item.creatorID, item.avatarID);
79 94
80 return true; 95 return true;
81 } 96 }