diff options
author | Oren Hurvitz | 2014-04-07 09:25:18 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-07 07:32:36 +0100 |
commit | 85d51e57a905ac8f823f345f525837926f4ed2ce (patch) | |
tree | 7fc86c9a7743afb0765cc8d822709e12bbc223f1 /OpenSim/Services | |
parent | Refactored: use Scene.GetAgentHomeURI() to get the Home URI of a user (diff) | |
download | opensim-SC_OLD-85d51e57a905ac8f823f345f525837926f4ed2ce.zip opensim-SC_OLD-85d51e57a905ac8f823f345f525837926f4ed2ce.tar.gz opensim-SC_OLD-85d51e57a905ac8f823f345f525837926f4ed2ce.tar.bz2 opensim-SC_OLD-85d51e57a905ac8f823f345f525837926f4ed2ce.tar.xz |
When sending QueryAccess to a region, also send the user's Home URI
Diffstat (limited to 'OpenSim/Services')
3 files changed, 28 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 171beaa..98686f8 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -272,9 +272,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
272 | } | 272 | } |
273 | 273 | ||
274 | 274 | ||
275 | /// <summary> | 275 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason) |
276 | /// </summary> | ||
277 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason) | ||
278 | { | 276 | { |
279 | reason = "Failed to contact destination"; | 277 | reason = "Failed to contact destination"; |
280 | version = "Unknown"; | 278 | version = "Unknown"; |
@@ -285,10 +283,12 @@ namespace OpenSim.Services.Connectors.Simulation | |||
285 | if (ext == null) return false; | 283 | if (ext == null) return false; |
286 | 284 | ||
287 | // Eventually, we want to use a caps url instead of the agentID | 285 | // Eventually, we want to use a caps url instead of the agentID |
288 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | 286 | string uri = destination.ServerURI + AgentPath() + agentID + "/" + destination.RegionID.ToString() + "/"; |
289 | 287 | ||
290 | OSDMap request = new OSDMap(); | 288 | OSDMap request = new OSDMap(); |
291 | request.Add("position", OSD.FromString(position.ToString())); | 289 | request.Add("position", OSD.FromString(position.ToString())); |
290 | if (agentHomeURI != null) | ||
291 | request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); | ||
292 | 292 | ||
293 | try | 293 | try |
294 | { | 294 | { |
diff --git a/OpenSim/Services/Interfaces/IHypergridServices.cs b/OpenSim/Services/Interfaces/IHypergridServices.cs index f3cdb76..30f27ee 100644 --- a/OpenSim/Services/Interfaces/IHypergridServices.cs +++ b/OpenSim/Services/Interfaces/IHypergridServices.cs | |||
@@ -37,6 +37,19 @@ namespace OpenSim.Services.Interfaces | |||
37 | public interface IGatekeeperService | 37 | public interface IGatekeeperService |
38 | { | 38 | { |
39 | bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason); | 39 | bool LinkRegion(string regionDescriptor, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason); |
40 | |||
41 | /// <summary> | ||
42 | /// Returns the region a Hypergrid visitor should enter. | ||
43 | /// </summary> | ||
44 | /// <remarks> | ||
45 | /// Usually the returned region will be the requested region. But the grid can choose to | ||
46 | /// redirect the user to another region: e.g., a default gateway region. | ||
47 | /// </remarks> | ||
48 | /// <param name="regionID">The region the visitor *wants* to enter</param> | ||
49 | /// <param name="agentID">The visitor's User ID. Will be missing (UUID.Zero) in older OpenSims.</param> | ||
50 | /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param> | ||
51 | /// <param name="message">[out] A message to show to the user (optional, may be null)</param> | ||
52 | /// <returns>The region the visitor should enter, or null if no region can be found / is allowed</returns> | ||
40 | GridRegion GetHyperlinkRegion(UUID regionID, UUID agentID, string agentHomeURI, out string message); | 53 | GridRegion GetHyperlinkRegion(UUID regionID, UUID agentID, string agentHomeURI, out string message); |
41 | 54 | ||
42 | bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); | 55 | bool LoginAgent(AgentCircuitData aCircuit, GridRegion destination, out string reason); |
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 1c82b3e..d359056 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs | |||
@@ -75,7 +75,17 @@ namespace OpenSim.Services.Interfaces | |||
75 | /// <returns></returns> | 75 | /// <returns></returns> |
76 | bool UpdateAgent(GridRegion destination, AgentPosition data); | 76 | bool UpdateAgent(GridRegion destination, AgentPosition data); |
77 | 77 | ||
78 | bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string version, out string reason); | 78 | /// <summary> |
79 | /// Returns whether a propspective user is allowed to visit the region. | ||
80 | /// </summary> | ||
81 | /// <param name="destination">Desired destination</param> | ||
82 | /// <param name="agentID">The visitor's User ID</param> | ||
83 | /// <param name="agentHomeURI">The visitor's Home URI. Will be missing (null) in older OpenSims.</param> | ||
84 | /// <param name="position">Position in the region</param> | ||
85 | /// <param name="version"></param> | ||
86 | /// <param name="reason">[out] Optional error message</param> | ||
87 | /// <returns>True: ok; False: not allowed</returns> | ||
88 | bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, Vector3 position, out string version, out string reason); | ||
79 | 89 | ||
80 | /// <summary> | 90 | /// <summary> |
81 | /// Message from receiving region to departing region, telling it got contacted by the client. | 91 | /// Message from receiving region to departing region, telling it got contacted by the client. |