mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user