From 1e220911938ef3d16cee0112b81333a60b3e5d52 Mon Sep 17 00:00:00 2001
From: AliciaRaven
Date: Sat, 13 Sep 2014 04:25:31 +0100
Subject: Modifications to previous IAR commits to bring them more inline with
existing OpenSim code conventions. Also include new IAR save switch in
console help print out.
---
.../Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 11 ++++++-----
.../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 6 ++++--
2 files changed, 10 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/CoreModules/Avatar')
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 401a238..9fb8aa5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -57,7 +57,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
public bool SaveAssets { get; set; }
///
- /// Determine whether this archive will filter content based on inventory permissions. Default is false
+ /// Determines which items will be included in the archive, according to their permissions.
+ /// Default is null, meaning no permission checks.
///
public string FilterContent { get; set; }
@@ -139,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_assetGatherer = new UuidGatherer(m_scene.AssetService);
SaveAssets = true;
- FilterContent = string.Empty;
+ FilterContent = null;
}
protected void ReceivedAllAssets(ICollection assetsFoundUuids, ICollection assetsNotFoundUuids, bool timedOut)
@@ -287,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
/// Whether the user is allowed to export the object to an IAR
private bool CanUserArchiveObject(UUID UserID, InventoryItemBase InvItem)
{
- if (FilterContent == string.Empty)
+ if (FilterContent == null)
return true;// Default To Allow Export
bool permitted = true;
@@ -317,10 +318,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
SaveAssets = false;
// Set Permission filter if flag is set
- if (options.ContainsKey("perm"))
+ if (options.ContainsKey("checkPermissions"))
{
Object temp;
- if (options.TryGetValue("perm", out temp))
+ if (options.TryGetValue("checkPermissions", out temp))
FilterContent = temp.ToString().ToUpper();
}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index b85bbea..5b5987d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -141,7 +141,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
+ "-e|--exclude= don't save the inventory item in archive" + Environment.NewLine
+ "-f|--excludefolder= don't save contents of the folder in archive" + Environment.NewLine
+ "-v|--verbose extra debug messages.\n"
- + "--noassets stops assets being saved to the IAR.",
+ + "--noassets stops assets being saved to the IAR."
+ + "--perm= stops items with insufficient permissions from being saved to the IAR.\n"
+ + " can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer, \"M\" = Modify.\n",
HandleSaveInvConsoleCommand);
m_aScene = scene;
@@ -455,7 +457,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
options["excludefolders"] = new List();
((List)options["excludefolders"]).Add(v);
});
- ops.Add("perm=", delegate(string v) { options["perm"] = v; });
+ ops.Add("perm=", delegate(string v) { options["checkPermissions"] = v; });
List mainParams = ops.Parse(cmdparams);
--
cgit v1.1