diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs')
-rw-r--r-- | OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs index 5a36332..e188665 100644 --- a/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs +++ b/OpenSim/Tests/Common/Helpers/UserInventoryHelpers.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Tests.Common | |||
101 | Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId) | 101 | Scene scene, string itemName, UUID itemId, InventoryType itemType, AssetBase asset, UUID userId) |
102 | { | 102 | { |
103 | return AddInventoryItem( | 103 | return AddInventoryItem( |
104 | scene, itemName, itemId, itemType, asset, userId, | 104 | scene, itemName, itemId, itemType, asset, userId, |
105 | scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name); | 105 | scene.InventoryService.GetFolderForType(userId, (FolderType)asset.Type).Name); |
106 | } | 106 | } |
107 | 107 | ||
@@ -128,6 +128,10 @@ namespace OpenSim.Tests.Common | |||
128 | item.Owner = userId; | 128 | item.Owner = userId; |
129 | item.AssetType = asset.Type; | 129 | item.AssetType = asset.Type; |
130 | item.InvType = (int)itemType; | 130 | item.InvType = (int)itemType; |
131 | item.BasePermissions = (uint)OpenMetaverse.PermissionMask.All | | ||
132 | (uint)(Framework.PermissionMask.FoldedMask | Framework.PermissionMask.FoldedCopy | Framework.PermissionMask.FoldedModify | Framework.PermissionMask.FoldedTransfer); | ||
133 | item.CurrentPermissions = (uint)OpenMetaverse.PermissionMask.All | | ||
134 | (uint)(Framework.PermissionMask.FoldedMask | Framework.PermissionMask.FoldedCopy | Framework.PermissionMask.FoldedModify | Framework.PermissionMask.FoldedTransfer); | ||
131 | 135 | ||
132 | InventoryFolderBase folder = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, userId, path)[0]; | 136 | InventoryFolderBase folder = InventoryArchiveUtils.FindFoldersByPath(scene.InventoryService, userId, path)[0]; |
133 | 137 | ||
@@ -207,7 +211,7 @@ namespace OpenSim.Tests.Common | |||
207 | /// </param> | 211 | /// </param> |
208 | /// <param name="useExistingFolders"> | 212 | /// <param name="useExistingFolders"> |
209 | /// If true, then folders in the path which already the same name are | 213 | /// If true, then folders in the path which already the same name are |
210 | /// used. This applies to the terminal folder as well. | 214 | /// used. This applies to the terminal folder as well. |
211 | /// If false, then all folders in the path are created, even if there is already a folder at a particular | 215 | /// If false, then all folders in the path are created, even if there is already a folder at a particular |
212 | /// level with the same name. | 216 | /// level with the same name. |
213 | /// </param> | 217 | /// </param> |
@@ -232,7 +236,7 @@ namespace OpenSim.Tests.Common | |||
232 | /// </param> | 236 | /// </param> |
233 | /// <param name="useExistingFolders"> | 237 | /// <param name="useExistingFolders"> |
234 | /// If true, then folders in the path which already the same name are | 238 | /// If true, then folders in the path which already the same name are |
235 | /// used. This applies to the terminal folder as well. | 239 | /// used. This applies to the terminal folder as well. |
236 | /// If false, then all folders in the path are created, even if there is already a folder at a particular | 240 | /// If false, then all folders in the path are created, even if there is already a folder at a particular |
237 | /// level with the same name. | 241 | /// level with the same name. |
238 | /// </param> | 242 | /// </param> |
@@ -255,7 +259,7 @@ namespace OpenSim.Tests.Common | |||
255 | /// Create inventory folders starting from a given parent folder | 259 | /// Create inventory folders starting from a given parent folder |
256 | /// </summary> | 260 | /// </summary> |
257 | /// <remarks> | 261 | /// <remarks> |
258 | /// If any stem of the path names folders that already exist then these are not recreated. This includes the | 262 | /// If any stem of the path names folders that already exist then these are not recreated. This includes the |
259 | /// final folder. | 263 | /// final folder. |
260 | /// TODO: May need to make it an option to create duplicate folders. | 264 | /// TODO: May need to make it an option to create duplicate folders. |
261 | /// </remarks> | 265 | /// </remarks> |
@@ -267,7 +271,7 @@ namespace OpenSim.Tests.Common | |||
267 | /// </param> | 271 | /// </param> |
268 | /// <param name="useExistingFolders"> | 272 | /// <param name="useExistingFolders"> |
269 | /// If true, then folders in the path which already the same name are | 273 | /// If true, then folders in the path which already the same name are |
270 | /// used. This applies to the terminal folder as well. | 274 | /// used. This applies to the terminal folder as well. |
271 | /// If false, then all folders in the path are created, even if there is already a folder at a particular | 275 | /// If false, then all folders in the path are created, even if there is already a folder at a particular |
272 | /// level with the same name. | 276 | /// level with the same name. |
273 | /// </param> | 277 | /// </param> |
@@ -295,10 +299,10 @@ namespace OpenSim.Tests.Common | |||
295 | else | 299 | else |
296 | folderIdForCreate = folderId; | 300 | folderIdForCreate = folderId; |
297 | 301 | ||
298 | folder | 302 | folder |
299 | = new InventoryFolderBase( | 303 | = new InventoryFolderBase( |
300 | folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0); | 304 | folderIdForCreate, components[0], parentFolder.Owner, (short)AssetType.Unknown, parentFolder.ID, 0); |
301 | 305 | ||
302 | inventoryService.AddFolder(folder); | 306 | inventoryService.AddFolder(folder); |
303 | } | 307 | } |
304 | // else | 308 | // else |
@@ -367,4 +371,4 @@ namespace OpenSim.Tests.Common | |||
367 | return InventoryArchiveUtils.FindItemsByPath(inventoryService, userId, path); | 371 | return InventoryArchiveUtils.FindItemsByPath(inventoryService, userId, path); |
368 | } | 372 | } |
369 | } | 373 | } |
370 | } \ No newline at end of file | 374 | } |