aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2011-02-04 17:05:45 -0800
committerDiva Canto2011-02-04 17:05:45 -0800
commitf5a3eb9fd547df043b00a2934d891dcfff3142ab (patch)
tree08f36e038b2c9fdc760bd63445a5da5e2f3c65ca /OpenSim/Region
parentFor now, reinstate the call to World.GridService.GetRegionsByName() commented... (diff)
downloadopensim-SC_OLD-f5a3eb9fd547df043b00a2934d891dcfff3142ab.zip
opensim-SC_OLD-f5a3eb9fd547df043b00a2934d891dcfff3142ab.tar.gz
opensim-SC_OLD-f5a3eb9fd547df043b00a2934d891dcfff3142ab.tar.bz2
opensim-SC_OLD-f5a3eb9fd547df043b00a2934d891dcfff3142ab.tar.xz
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...
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs8
1 files changed, 6 insertions, 2 deletions
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
55 } 55 }
56 56
57 private string m_ProfileServerURI; 57 private string m_ProfileServerURI;
58 private bool m_OutboundPermission;
58 59
59// private bool m_Initialized = false; 60// private bool m_Initialized = false;
60 61
@@ -78,7 +79,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
78 79
79 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; 80 IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"];
80 if (thisModuleConfig != null) 81 if (thisModuleConfig != null)
82 {
81 m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty); 83 m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty);
84 m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true);
85 }
82 else 86 else
83 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); 87 m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!");
84 } 88 }
@@ -103,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
103 public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel) 107 public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel)
104 { 108 {
105 string userAssetServer = string.Empty; 109 string userAssetServer = string.Empty;
106 if (IsForeignUser(avatarID, out userAssetServer)) 110 if (IsForeignUser(avatarID, out userAssetServer) && m_OutboundPermission)
107 { 111 {
108 Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); }); 112 Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); });
109 } 113 }
@@ -197,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
197 if (IsForeignUser(sender, out userAssetServer)) 201 if (IsForeignUser(sender, out userAssetServer))
198 m_assMapper.Get(item.AssetID, sender, userAssetServer); 202 m_assMapper.Get(item.AssetID, sender, userAssetServer);
199 203
200 if (IsForeignUser(receiver, out userAssetServer)) 204 if (IsForeignUser(receiver, out userAssetServer) && m_OutboundPermission)
201 m_assMapper.Post(item.AssetID, receiver, userAssetServer); 205 m_assMapper.Post(item.AssetID, receiver, userAssetServer);
202 } 206 }
203 207