diff options
author | Justin Clark-Casey (justincc) | 2012-11-02 01:41:38 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-11-02 01:41:38 +0000 |
commit | ce7beb6f20cb09e19e0f695f445cfa860b9e9c78 (patch) | |
tree | 1904f199f3abebbe756381f1627cb343368e3e31 /OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | |
parent | Move check to allow only deletion of maptiles up to AssetServerDeleteHandler ... (diff) | |
download | opensim-SC_OLD-ce7beb6f20cb09e19e0f695f445cfa860b9e9c78.zip opensim-SC_OLD-ce7beb6f20cb09e19e0f695f445cfa860b9e9c78.tar.gz opensim-SC_OLD-ce7beb6f20cb09e19e0f695f445cfa860b9e9c78.tar.bz2 opensim-SC_OLD-ce7beb6f20cb09e19e0f695f445cfa860b9e9c78.tar.xz |
Add [AssetService] AllowRemoteDeleteAllTypes (default false).
This allows a closed grid to delete asset types other than maptile remotely.
Only operational if AllowRemoteDelete = true also.
Defaults to false - do not enable if anybody other than you can make asset service requests.
Diffstat (limited to 'OpenSim/Server/Handlers/Asset/AssetServerConnector.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs index 4123f49..ff45d94 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | |||
@@ -67,10 +67,25 @@ namespace OpenSim.Server.Handlers.Asset | |||
67 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); | 67 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); |
68 | 68 | ||
69 | bool allowDelete = serverConfig.GetBoolean("AllowRemoteDelete", false); | 69 | bool allowDelete = serverConfig.GetBoolean("AllowRemoteDelete", false); |
70 | bool allowDeleteAllTypes = serverConfig.GetBoolean("AllowRemoteDeleteAllTypes", false); | ||
71 | |||
72 | AllowedRemoteDeleteTypes allowedRemoteDeleteTypes; | ||
73 | |||
74 | if (!allowDelete) | ||
75 | { | ||
76 | allowedRemoteDeleteTypes = AllowedRemoteDeleteTypes.None; | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | if (allowDeleteAllTypes) | ||
81 | allowedRemoteDeleteTypes = AllowedRemoteDeleteTypes.All; | ||
82 | else | ||
83 | allowedRemoteDeleteTypes = AllowedRemoteDeleteTypes.MapTile; | ||
84 | } | ||
70 | 85 | ||
71 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); | 86 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); |
72 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); | 87 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); |
73 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService, allowDelete)); | 88 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService, allowedRemoteDeleteTypes)); |
74 | 89 | ||
75 | MainConsole.Instance.Commands.AddCommand("Assets", false, | 90 | MainConsole.Instance.Commands.AddCommand("Assets", false, |
76 | "show asset", | 91 | "show asset", |