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