diff options
author | AliciaRaven | 2014-09-13 04:25:31 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-09-23 00:04:59 +0100 |
commit | 1e220911938ef3d16cee0112b81333a60b3e5d52 (patch) | |
tree | 8f7104983c4760c06b721ce4b0211ec4817b7b6e /OpenSim/Region/CoreModules/World/Archiver | |
parent | Add an event callback for loading IAR files. The callback for creating them a... (diff) | |
download | opensim-SC-1e220911938ef3d16cee0112b81333a60b3e5d52.zip opensim-SC-1e220911938ef3d16cee0112b81333a60b3e5d52.tar.gz opensim-SC-1e220911938ef3d16cee0112b81333a60b3e5d52.tar.bz2 opensim-SC-1e220911938ef3d16cee0112b81333a60b3e5d52.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 803f24e..924b999 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
80 | /// Determines which objects will be included in the archive, according to their permissions. | 80 | /// Determines which objects will be included in the archive, according to their permissions. |
81 | /// Default is null, meaning no permission checks. | 81 | /// Default is null, meaning no permission checks. |
82 | /// </summary> | 82 | /// </summary> |
83 | public string CheckPermissions { get; set; } | 83 | public string FilterContent { get; set; } |
84 | 84 | ||
85 | protected Scene m_rootScene; | 85 | protected Scene m_rootScene; |
86 | protected Stream m_saveStream; | 86 | protected Stream m_saveStream; |
@@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
131 | 131 | ||
132 | MultiRegionFormat = false; | 132 | MultiRegionFormat = false; |
133 | SaveAssets = true; | 133 | SaveAssets = true; |
134 | CheckPermissions = null; | 134 | FilterContent = null; |
135 | } | 135 | } |
136 | 136 | ||
137 | /// <summary> | 137 | /// <summary> |
@@ -150,7 +150,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
150 | 150 | ||
151 | Object temp; | 151 | Object temp; |
152 | if (options.TryGetValue("checkPermissions", out temp)) | 152 | if (options.TryGetValue("checkPermissions", out temp)) |
153 | CheckPermissions = (string)temp; | 153 | FilterContent = (string)temp; |
154 | 154 | ||
155 | 155 | ||
156 | // Find the regions to archive | 156 | // Find the regions to archive |
@@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
238 | 238 | ||
239 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) | 239 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) |
240 | { | 240 | { |
241 | if (!CanUserArchiveObject(scene.RegionInfo.EstateSettings.EstateOwner, sceneObject, CheckPermissions, permissionsModule)) | 241 | if (!CanUserArchiveObject(scene.RegionInfo.EstateSettings.EstateOwner, sceneObject, FilterContent, permissionsModule)) |
242 | { | 242 | { |
243 | // The user isn't allowed to copy/transfer this object, so it will not be included in the OAR. | 243 | // The user isn't allowed to copy/transfer this object, so it will not be included in the OAR. |
244 | ++numObjectsSkippedPermissions; | 244 | ++numObjectsSkippedPermissions; |
@@ -296,12 +296,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
296 | /// </summary> | 296 | /// </summary> |
297 | /// <param name="user">The user</param> | 297 | /// <param name="user">The user</param> |
298 | /// <param name="objGroup">The object group</param> | 298 | /// <param name="objGroup">The object group</param> |
299 | /// <param name="checkPermissions">Which permissions to check: "C" = Copy, "T" = Transfer</param> | 299 | /// <param name="filterContent">Which permissions to check: "C" = Copy, "T" = Transfer</param> |
300 | /// <param name="permissionsModule">The scene's permissions module</param> | 300 | /// <param name="permissionsModule">The scene's permissions module</param> |
301 | /// <returns>Whether the user is allowed to export the object to an OAR</returns> | 301 | /// <returns>Whether the user is allowed to export the object to an OAR</returns> |
302 | private bool CanUserArchiveObject(UUID user, SceneObjectGroup objGroup, string checkPermissions, IPermissionsModule permissionsModule) | 302 | private bool CanUserArchiveObject(UUID user, SceneObjectGroup objGroup, string filterContent, IPermissionsModule permissionsModule) |
303 | { | 303 | { |
304 | if (checkPermissions == null) | 304 | if (filterContent == null) |
305 | return true; | 305 | return true; |
306 | 306 | ||
307 | if (permissionsModule == null) | 307 | if (permissionsModule == null) |
@@ -343,9 +343,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
343 | canTransfer |= (obj.EveryoneMask & (uint)PermissionMask.Copy) != 0; | 343 | canTransfer |= (obj.EveryoneMask & (uint)PermissionMask.Copy) != 0; |
344 | 344 | ||
345 | bool partPermitted = true; | 345 | bool partPermitted = true; |
346 | if (checkPermissions.Contains("C") && !canCopy) | 346 | if (filterContent.Contains("C") && !canCopy) |
347 | partPermitted = false; | 347 | partPermitted = false; |
348 | if (checkPermissions.Contains("T") && !canTransfer) | 348 | if (filterContent.Contains("T") && !canTransfer) |
349 | partPermitted = false; | 349 | partPermitted = false; |
350 | 350 | ||
351 | // If the user is the Creator of the object then it can always be included in the OAR | 351 | // If the user is the Creator of the object then it can always be included in the OAR |