From f5a3eb9fd547df043b00a2934d891dcfff3142ab Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Feb 2011 17:05:45 -0800 Subject: Added a config var to HGInventoryAccessModule called OutboundPermission that controls whether the sim lets asset POSTs happen to foreign grids or not. It's True by default. If ppl want to allow foreign visitors but don't want to allow any assets out of their grid, they should set this to False. This is the beginning of policies for these things... --- .../Framework/InventoryAccess/HGInventoryAccessModule.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 34b8114..4565d10 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -55,6 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } private string m_ProfileServerURI; + private bool m_OutboundPermission; // private bool m_Initialized = false; @@ -78,7 +79,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; if (thisModuleConfig != null) + { m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty); + m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); + } else m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); } @@ -103,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel) { string userAssetServer = string.Empty; - if (IsForeignUser(avatarID, out userAssetServer)) + if (IsForeignUser(avatarID, out userAssetServer) && m_OutboundPermission) { Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); }); } @@ -197,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (IsForeignUser(sender, out userAssetServer)) m_assMapper.Get(item.AssetID, sender, userAssetServer); - if (IsForeignUser(receiver, out userAssetServer)) + if (IsForeignUser(receiver, out userAssetServer) && m_OutboundPermission) m_assMapper.Post(item.AssetID, receiver, userAssetServer); } -- cgit v1.1