diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs index 741075c..3675583 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | private static bool initialized = false; | 55 | private static bool initialized = false; |
56 | private static bool enabled = false; | 56 | private static bool enabled = false; |
57 | private static bool safemode = false; | ||
57 | 58 | ||
58 | private bool m_doLookup = false; | 59 | private bool m_doLookup = false; |
59 | Scene m_scene; | 60 | Scene m_scene; |
@@ -77,6 +78,8 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
77 | 78 | ||
78 | // This module is only on for standalones | 79 | // This module is only on for standalones |
79 | enabled = !config.Configs["Startup"].GetBoolean("gridmode", true) && config.Configs["Startup"].GetBoolean("hypergrid", false); | 80 | enabled = !config.Configs["Startup"].GetBoolean("gridmode", true) && config.Configs["Startup"].GetBoolean("hypergrid", false); |
81 | if (config.Configs["Hypergrid"] != null) | ||
82 | safemode = config.Configs["Hypergrid"].GetBoolean("safemode", false); | ||
80 | } | 83 | } |
81 | } | 84 | } |
82 | 85 | ||
@@ -116,34 +119,35 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
116 | 119 | ||
117 | public virtual void AddHttpHandlers(IHttpServer httpServer) | 120 | public virtual void AddHttpHandlers(IHttpServer httpServer) |
118 | { | 121 | { |
119 | 122 | if (!safemode) | |
120 | httpServer.AddStreamHandler( | 123 | { |
121 | new RestDeserialiseSecureHandler<Guid, InventoryCollection>( | 124 | httpServer.AddStreamHandler( |
122 | "POST", "/GetInventory/", m_inventoryService.GetUserInventory, CheckAuthSession)); | 125 | new RestDeserialiseSecureHandler<Guid, InventoryCollection>( |
126 | "POST", "/GetInventory/", m_inventoryService.GetUserInventory, CheckAuthSession)); | ||
127 | httpServer.AddStreamHandler( | ||
128 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( | ||
129 | "POST", "/DeleteItem/", m_inventoryBase.DeleteItem, CheckAuthSession)); | ||
130 | httpServer.AddStreamHandler( | ||
131 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | ||
132 | "POST", "/UpdateFolder/", m_inventoryBase.UpdateFolder, CheckAuthSession)); | ||
133 | |||
134 | httpServer.AddStreamHandler( | ||
135 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | ||
136 | "POST", "/MoveFolder/", m_inventoryBase.MoveFolder, CheckAuthSession)); | ||
137 | |||
138 | httpServer.AddStreamHandler( | ||
139 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | ||
140 | "POST", "/PurgeFolder/", m_inventoryBase.PurgeFolder, CheckAuthSession)); | ||
141 | } | ||
123 | 142 | ||
124 | httpServer.AddStreamHandler( | 143 | httpServer.AddStreamHandler( |
125 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | 144 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( |
126 | "POST", "/NewFolder/", m_inventoryBase.AddFolder, CheckAuthSession)); | 145 | "POST", "/NewFolder/", m_inventoryBase.AddFolder, CheckAuthSession)); |
127 | 146 | ||
128 | httpServer.AddStreamHandler( | 147 | httpServer.AddStreamHandler( |
129 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | ||
130 | "POST", "/UpdateFolder/", m_inventoryBase.UpdateFolder, CheckAuthSession)); | ||
131 | |||
132 | httpServer.AddStreamHandler( | ||
133 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | ||
134 | "POST", "/MoveFolder/", m_inventoryBase.MoveFolder, CheckAuthSession)); | ||
135 | |||
136 | httpServer.AddStreamHandler( | ||
137 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | ||
138 | "POST", "/PurgeFolder/", m_inventoryBase.PurgeFolder, CheckAuthSession)); | ||
139 | |||
140 | httpServer.AddStreamHandler( | ||
141 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( | 148 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( |
142 | "POST", "/NewItem/", m_inventoryBase.AddItem, CheckAuthSession)); | 149 | "POST", "/NewItem/", m_inventoryBase.AddItem, CheckAuthSession)); |
143 | 150 | ||
144 | httpServer.AddStreamHandler( | ||
145 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( | ||
146 | "POST", "/DeleteItem/", m_inventoryBase.DeleteItem, CheckAuthSession)); | ||
147 | 151 | ||
148 | } | 152 | } |
149 | 153 | ||