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.
This commit is contained in:
Oren Hurvitz
2014-05-18 19:45:27 +03:00
parent 78733b979f
commit 47b84875fd
7 changed files with 18 additions and 12 deletions

View File

@@ -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));