aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-08-26 20:04:07 +0100
committerJustin Clark-Casey (justincc)2013-08-26 20:04:07 +0100
commitea5bab51071c613b5412978b56c058aeef40bcb2 (patch)
treea4203b49ed2cd2ec96d147e6300d1a9360580293 /OpenSim/Region
parentminor: remove mono compiler warning from LLClientView (diff)
downloadopensim-SC_OLD-ea5bab51071c613b5412978b56c058aeef40bcb2.zip
opensim-SC_OLD-ea5bab51071c613b5412978b56c058aeef40bcb2.tar.gz
opensim-SC_OLD-ea5bab51071c613b5412978b56c058aeef40bcb2.tar.bz2
opensim-SC_OLD-ea5bab51071c613b5412978b56c058aeef40bcb2.tar.xz
For a Hypergrid user, delay estate access checks until NewUserConnection() so that they work.
This is necessary because the hypergrid groups checks (as referenced by estates) require an agent circuit to be present to construct the hypergrid ID. However, this is not around until Scene.NewUserConnection(), as called by CreateAgent() in EntityTransferModule. Therefore, if we're dealing with a hypergrid user, delay the check until NewUserConnection()/CreateAgent() The entity transfer impact should be minimal since CreateAgent() is the next significant call after NewUserConnection() However, to preserve the accuracy of query access we will only relax the check for HG users.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index cb12d65..054e17b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5739,9 +5739,13 @@ namespace OpenSim.Region.Framework.Scenes
5739 5739
5740 try 5740 try
5741 { 5741 {
5742 if (!AuthorizeUser(aCircuit, false, out reason)) 5742 // If this is a hypergrid user, then we can't perform a successful groups access check here since this
5743 // currently relies on a circuit being present in the AuthenticateHandler to construct a Hypergrid ID.
5744 // This is only present in NewUserConnection() which entity transfer calls very soon after QueryAccess().
5745 // Therefore, we'll defer to the check in NewUserConnection() instead.
5746 if (!AuthorizeUser(aCircuit, !UserManagementModule.IsLocalGridUser(agentID), out reason))
5743 { 5747 {
5744 // m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID); 5748 //m_log.DebugFormat("[SCENE]: Denying access for {0}", agentID);
5745 return false; 5749 return false;
5746 } 5750 }
5747 } 5751 }