diff options
author | Melanie | 2012-03-27 23:14:43 +0100 |
---|---|---|
committer | Melanie | 2012-03-27 23:14:43 +0100 |
commit | b18b1b1d700d4a5ffd306e5b69a08b241188c525 (patch) | |
tree | 2bb99cd8095a9b562f9ee075274508da973dd2a2 /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Reverse a conditional in XInventory that made updating system folder evrsion ... (diff) | |
download | opensim-SC_OLD-b18b1b1d700d4a5ffd306e5b69a08b241188c525.zip opensim-SC_OLD-b18b1b1d700d4a5ffd306e5b69a08b241188c525.tar.gz opensim-SC_OLD-b18b1b1d700d4a5ffd306e5b69a08b241188c525.tar.bz2 opensim-SC_OLD-b18b1b1d700d4a5ffd306e5b69a08b241188c525.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 37 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 95e3aec..874693e 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -47,6 +47,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
47 | 47 | ||
48 | protected Scene m_Scene; | 48 | protected Scene m_Scene; |
49 | private bool m_dumpAssetsToFile = false; | 49 | private bool m_dumpAssetsToFile = false; |
50 | private int m_levelUpload = 0; | ||
50 | 51 | ||
51 | /// <summary> | 52 | /// <summary> |
52 | /// Each agent has its own singleton collection of transactions | 53 | /// Each agent has its own singleton collection of transactions |
@@ -56,8 +57,13 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
56 | 57 | ||
57 | #region IRegionModule Members | 58 | #region IRegionModule Members |
58 | 59 | ||
59 | public void Initialise(IConfigSource config) | 60 | public void Initialise(IConfigSource source) |
60 | { | 61 | { |
62 | IConfig sconfig = source.Configs["Startup"]; | ||
63 | if (sconfig != null) | ||
64 | { | ||
65 | m_levelUpload = sconfig.GetInt("LevelUpload", 0); | ||
66 | } | ||
61 | } | 67 | } |
62 | 68 | ||
63 | public void AddRegion(Scene scene) | 69 | public void AddRegion(Scene scene) |
@@ -241,7 +247,21 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
241 | (AssetType)type == AssetType.Animation) && | 247 | (AssetType)type == AssetType.Animation) && |
242 | tempFile == false) | 248 | tempFile == false) |
243 | { | 249 | { |
250 | ScenePresence avatar = null; | ||
244 | Scene scene = (Scene)remoteClient.Scene; | 251 | Scene scene = (Scene)remoteClient.Scene; |
252 | scene.TryGetScenePresence(remoteClient.AgentId, out avatar); | ||
253 | |||
254 | // check user level | ||
255 | if (avatar != null) | ||
256 | { | ||
257 | if (avatar.UserLevel < m_levelUpload) | ||
258 | { | ||
259 | remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); | ||
260 | return; | ||
261 | } | ||
262 | } | ||
263 | |||
264 | // check funds | ||
245 | IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); | 265 | IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); |
246 | 266 | ||
247 | if (mm != null) | 267 | if (mm != null) |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index a2d833b..a422552 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -60,6 +60,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
60 | set { m_MaxTransferDistance = value; } | 60 | set { m_MaxTransferDistance = value; } |
61 | } | 61 | } |
62 | 62 | ||
63 | private int m_levelHGTeleport = 0; | ||
64 | |||
63 | protected bool m_Enabled = false; | 65 | protected bool m_Enabled = false; |
64 | protected Scene m_aScene; | 66 | protected Scene m_aScene; |
65 | protected List<Scene> m_Scenes = new List<Scene>(); | 67 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -101,7 +103,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
101 | { | 103 | { |
102 | IConfig transferConfig = source.Configs["EntityTransfer"]; | 104 | IConfig transferConfig = source.Configs["EntityTransfer"]; |
103 | if (transferConfig != null) | 105 | if (transferConfig != null) |
106 | { | ||
104 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); | 107 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); |
108 | m_levelHGTeleport = transferConfig.GetInt("LevelHGTeleport", 0); | ||
109 | } | ||
105 | 110 | ||
106 | m_agentsInTransit = new List<UUID>(); | 111 | m_agentsInTransit = new List<UUID>(); |
107 | m_Enabled = true; | 112 | m_Enabled = true; |
@@ -228,6 +233,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
228 | return; | 233 | return; |
229 | } | 234 | } |
230 | 235 | ||
236 | // check if HyperGrid teleport is allowed, based on user level | ||
237 | int flags = m_aScene.GridService.GetRegionFlags(sp.Scene.RegionInfo.ScopeID, reg.RegionID); | ||
238 | |||
239 | if (((flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) && (sp.UserLevel < m_levelHGTeleport)) | ||
240 | { | ||
241 | m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination link is non permitted hypergrid region. Unable to teleport agent."); | ||
242 | sp.ControllingClient.SendTeleportFailed("HyperGrid teleport not permitted"); | ||
243 | return; | ||
244 | } | ||
245 | |||
231 | uint curX = 0, curY = 0; | 246 | uint curX = 0, curY = 0; |
232 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); | 247 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); |
233 | int curCellX = (int)(curX / Constants.RegionSize); | 248 | int curCellX = (int)(curX / Constants.RegionSize); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 10ab6d0..77573c3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
167 | 167 | ||
168 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) | 168 | public List<InventoryFolderBase> GetInventorySkeleton(UUID userId) |
169 | { | 169 | { |
170 | return new List<InventoryFolderBase>(); | 170 | return m_RemoteConnector.GetInventorySkeleton(userId); |
171 | } | 171 | } |
172 | 172 | ||
173 | public InventoryCollection GetUserInventory(UUID userID) | 173 | public InventoryCollection GetUserInventory(UUID userID) |