aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorDiva Canto2013-07-24 11:23:19 -0700
committerDiva Canto2013-07-24 11:25:41 -0700
commite103e34f1d17d218c55ebb1ff19450c018cf73b2 (patch)
tree0ee3e4b201fd85d03f944af3190dd2c9f11bf4a3 /OpenSim/Region/Framework/Scenes/Scene.cs
parentDecreased the time of group cache to 1 min, because it was getting on my nerv... (diff)
downloadopensim-SC_OLD-e103e34f1d17d218c55ebb1ff19450c018cf73b2.zip
opensim-SC_OLD-e103e34f1d17d218c55ebb1ff19450c018cf73b2.tar.gz
opensim-SC_OLD-e103e34f1d17d218c55ebb1ff19450c018cf73b2.tar.bz2
opensim-SC_OLD-e103e34f1d17d218c55ebb1ff19450c018cf73b2.tar.xz
Added config var that we all thought was already there: see_into_region. (Note: different from the defunct see_into_neighboring_sim, which used to control the process from the other end). This enables child agents in neighbors for which the root agent doesn't have permission to be in.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs79
1 files changed, 45 insertions, 34 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9cfe869..e443c1d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -230,6 +230,8 @@ namespace OpenSim.Region.Framework.Scenes
230 230
231 public int MaxUndoCount { get; set; } 231 public int MaxUndoCount { get; set; }
232 232
233 public bool SeeIntoRegion { get; set; }
234
233 // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; 235 // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet;
234 public bool LoginLock = false; 236 public bool LoginLock = false;
235 237
@@ -839,6 +841,8 @@ namespace OpenSim.Region.Framework.Scenes
839 //Animation states 841 //Animation states
840 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 842 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
841 843
844 SeeIntoRegion = startupConfig.GetBoolean("see_into_region", true);
845
842 MaxUndoCount = startupConfig.GetInt("MaxPrimUndos", 20); 846 MaxUndoCount = startupConfig.GetInt("MaxPrimUndos", 20);
843 847
844 PhysicalPrims = startupConfig.GetBoolean("physical_prim", PhysicalPrims); 848 PhysicalPrims = startupConfig.GetBoolean("physical_prim", PhysicalPrims);
@@ -4010,51 +4014,58 @@ namespace OpenSim.Region.Framework.Scenes
4010 m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!"); 4014 m_log.ErrorFormat("[CONNECTION BEGIN]: Estate Settings is null!");
4011 } 4015 }
4012 4016
4013 List<UUID> agentGroups = new List<UUID>(); 4017 // We only test the things below when we want to cut off
4014 4018 // child agents from being present in the scene for which their root
4015 if (m_groupsModule != null) 4019 // agent isn't allowed. Otherwise, we allow child agents. The test for
4020 // the root is done elsewhere (QueryAccess)
4021 if (!SeeIntoRegion)
4016 { 4022 {
4017 GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID); 4023 List<UUID> agentGroups = new List<UUID>();
4018 4024
4019 if (GroupMembership != null) 4025 if (m_groupsModule != null)
4020 {
4021 for (int i = 0; i < GroupMembership.Length; i++)
4022 agentGroups.Add(GroupMembership[i].GroupID);
4023 }
4024 else
4025 { 4026 {
4026 m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!"); 4027 GroupMembershipData[] GroupMembership = m_groupsModule.GetMembershipData(agent.AgentID);
4028
4029 if (GroupMembership != null)
4030 {
4031 for (int i = 0; i < GroupMembership.Length; i++)
4032 agentGroups.Add(GroupMembership[i].GroupID);
4033 }
4034 else
4035 {
4036 m_log.ErrorFormat("[CONNECTION BEGIN]: GroupMembership is null!");
4037 }
4027 } 4038 }
4028 }
4029 4039
4030 bool groupAccess = false; 4040 bool groupAccess = false;
4031 UUID[] estateGroups = RegionInfo.EstateSettings.EstateGroups; 4041 UUID[] estateGroups = RegionInfo.EstateSettings.EstateGroups;
4032 4042
4033 if (estateGroups != null) 4043 if (estateGroups != null)
4034 {
4035 foreach (UUID group in estateGroups)
4036 { 4044 {
4037 if (agentGroups.Contains(group)) 4045 foreach (UUID group in estateGroups)
4038 { 4046 {
4039 groupAccess = true; 4047 if (agentGroups.Contains(group))
4040 break; 4048 {
4049 groupAccess = true;
4050 break;
4051 }
4041 } 4052 }
4042 } 4053 }
4043 } 4054 else
4044 else 4055 {
4045 { 4056 m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!");
4046 m_log.ErrorFormat("[CONNECTION BEGIN]: EstateGroups is null!"); 4057 }
4047 }
4048 4058
4049 if (!RegionInfo.EstateSettings.PublicAccess && 4059 if (!RegionInfo.EstateSettings.PublicAccess &&
4050 !RegionInfo.EstateSettings.HasAccess(agent.AgentID) && 4060 !RegionInfo.EstateSettings.HasAccess(agent.AgentID) &&
4051 !groupAccess) 4061 !groupAccess)
4052 { 4062 {
4053 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", 4063 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate",
4054 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 4064 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
4055 reason = String.Format("Denied access to private region {0}: You are not on the access list for that region.", 4065 reason = String.Format("Denied access to private region {0}: You are not on the access list for that region.",
4056 RegionInfo.RegionName); 4066 RegionInfo.RegionName);
4057 return false; 4067 return false;
4068 }
4058 } 4069 }
4059 4070
4060 // TODO: estate/region settings are not properly hooked up 4071 // TODO: estate/region settings are not properly hooked up