diff options
author | Melanie | 2010-07-24 23:36:07 +0100 |
---|---|---|
committer | Melanie | 2010-07-24 23:36:07 +0100 |
commit | aa7cadca5233dccf478af93be88b59fc08fc2ecd (patch) | |
tree | 8975c503282acd05c11267e0937577c85ef46856 /OpenSim/Services | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-aa7cadca5233dccf478af93be88b59fc08fc2ecd.zip opensim-SC_OLD-aa7cadca5233dccf478af93be88b59fc08fc2ecd.tar.gz opensim-SC_OLD-aa7cadca5233dccf478af93be88b59fc08fc2ecd.tar.bz2 opensim-SC_OLD-aa7cadca5233dccf478af93be88b59fc08fc2ecd.tar.xz |
Add some options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/InventoryService/XInventoryService.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 79afc8d..f581f76 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -45,6 +45,7 @@ namespace OpenSim.Services.InventoryService | |||
45 | MethodBase.GetCurrentMethod().DeclaringType); | 45 | MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | protected IXInventoryData m_Database; | 47 | protected IXInventoryData m_Database; |
48 | protected bool m_AllowDelete = true; | ||
48 | 49 | ||
49 | public XInventoryService(IConfigSource config) : base(config) | 50 | public XInventoryService(IConfigSource config) : base(config) |
50 | { | 51 | { |
@@ -60,6 +61,7 @@ namespace OpenSim.Services.InventoryService | |||
60 | { | 61 | { |
61 | dllName = authConfig.GetString("StorageProvider", dllName); | 62 | dllName = authConfig.GetString("StorageProvider", dllName); |
62 | connString = authConfig.GetString("ConnectionString", connString); | 63 | connString = authConfig.GetString("ConnectionString", connString); |
64 | m_AllowDelete = authConfig.GetBoolean("AllowDelete", true); | ||
63 | // realm = authConfig.GetString("Realm", realm); | 65 | // realm = authConfig.GetString("Realm", realm); |
64 | } | 66 | } |
65 | 67 | ||
@@ -304,6 +306,9 @@ namespace OpenSim.Services.InventoryService | |||
304 | // | 306 | // |
305 | public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs) | 307 | public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs) |
306 | { | 308 | { |
309 | if (!m_AllowDelete) | ||
310 | return false; | ||
311 | |||
307 | // Ignore principal ID, it's bogus at connector level | 312 | // Ignore principal ID, it's bogus at connector level |
308 | // | 313 | // |
309 | foreach (UUID id in folderIDs) | 314 | foreach (UUID id in folderIDs) |
@@ -321,6 +326,9 @@ namespace OpenSim.Services.InventoryService | |||
321 | 326 | ||
322 | public virtual bool PurgeFolder(InventoryFolderBase folder) | 327 | public virtual bool PurgeFolder(InventoryFolderBase folder) |
323 | { | 328 | { |
329 | if (!m_AllowDelete) | ||
330 | return false; | ||
331 | |||
324 | if (!ParentIsTrash(folder.ID)) | 332 | if (!ParentIsTrash(folder.ID)) |
325 | return false; | 333 | return false; |
326 | 334 | ||
@@ -363,6 +371,9 @@ namespace OpenSim.Services.InventoryService | |||
363 | 371 | ||
364 | public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs) | 372 | public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs) |
365 | { | 373 | { |
374 | if (!m_AllowDelete) | ||
375 | return false; | ||
376 | |||
366 | // Just use the ID... *facepalms* | 377 | // Just use the ID... *facepalms* |
367 | // | 378 | // |
368 | foreach (UUID id in itemIDs) | 379 | foreach (UUID id in itemIDs) |