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

@@ -761,7 +761,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
string reason;
string version;
if (!Scene.SimulationService.QueryAccess(
finalDestination, sp.ControllingClient.AgentId, homeURI, position, out version, out reason))
finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, out version, out reason))
{
sp.ControllingClient.SendTeleportFailed(reason);
@@ -1510,7 +1510,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Check to see if we have access to the target region.
if (neighbourRegion != null
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, newpos, out version, out failureReason))
&& !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, out version, out failureReason))
{
// remember banned
m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);