diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs index f33bb90..8014fb5 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs | |||
@@ -47,11 +47,13 @@ namespace OpenSim.Server.Handlers.Asset | |||
47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | private IAssetService m_AssetService; | 49 | private IAssetService m_AssetService; |
50 | protected bool m_allowDelete; | ||
50 | 51 | ||
51 | public AssetServerDeleteHandler(IAssetService service) : | 52 | public AssetServerDeleteHandler(IAssetService service, bool allowDelete) : |
52 | base("DELETE", "/assets") | 53 | base("DELETE", "/assets") |
53 | { | 54 | { |
54 | m_AssetService = service; | 55 | m_AssetService = service; |
56 | m_allowDelete = allowDelete; | ||
55 | } | 57 | } |
56 | 58 | ||
57 | public override byte[] Handle(string path, Stream request, | 59 | public override byte[] Handle(string path, Stream request, |
@@ -61,9 +63,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
61 | 63 | ||
62 | string[] p = SplitParams(path); | 64 | string[] p = SplitParams(path); |
63 | 65 | ||
64 | if (p.Length > 0) | 66 | if (p.Length > 0 && m_allowDelete) |
65 | { | 67 | { |
66 | // result = m_AssetService.Delete(p[0]); | 68 | result = m_AssetService.Delete(p[0]); |
67 | } | 69 | } |
68 | 70 | ||
69 | XmlSerializer xs = new XmlSerializer(typeof(bool)); | 71 | XmlSerializer xs = new XmlSerializer(typeof(bool)); |