From 47b84875fd2b9f01140288a2695c33f5ef4466c0 Mon Sep 17 00:00:00 2001
From: Oren Hurvitz
Date: Sun, 18 May 2014 19:45:27 +0300
Subject: Tell QueryAccess explicitly whether the user is coming in via
Teleport or Cross, because the permission checks are different.
Previously we used a heuristic of checking if the entry position is 0 to differentiate between Teleport and Cross, but that doesn't work anymore since we've started providing the precise entry position for cross, too. That's required in order to ensure that the user is allowed to enter the parcel that he's walking into.
---
OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 3 ++-
OpenSim/Services/Interfaces/ISimulationService.cs | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Services')
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index d9fe5a0..099ba98 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -282,7 +282,7 @@ namespace OpenSim.Services.Connectors.Simulation
}
- public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason)
+ public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason)
{
reason = "Failed to contact destination";
version = "Unknown";
@@ -296,6 +296,7 @@ namespace OpenSim.Services.Connectors.Simulation
string uri = destination.ServerURI + AgentPath() + agentID + "/" + destination.RegionID.ToString() + "/";
OSDMap request = new OSDMap();
+ request.Add("viaTeleport", OSD.FromBoolean(viaTeleport));
request.Add("position", OSD.FromString(position.ToString()));
if (agentHomeURI != null)
request.Add("agent_home_uri", OSD.FromString(agentHomeURI));
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs
index 375a35c..8b87ac0 100644
--- a/OpenSim/Services/Interfaces/ISimulationService.cs
+++ b/OpenSim/Services/Interfaces/ISimulationService.cs
@@ -83,11 +83,12 @@ namespace OpenSim.Services.Interfaces
/// Desired destination
/// The visitor's User ID
/// The visitor's Home URI. Will be missing (null) in older OpenSims.
+ /// True: via teleport; False: via cross (walking)
/// Position in the region
///
/// [out] Optional error message
/// True: ok; False: not allowed
- bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason);
+ bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string version, out string reason);
///
/// Message from receiving region to departing region, telling it got contacted by the client.
--
cgit v1.1