aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-01-09 15:59:33 +0000
committerMelanie2010-01-09 15:59:33 +0000
commit1597e33549b38435b1727ddafa89bc9e9bd404da (patch)
tree4e8f827c81155873b4d85bc2a69f190282d5b9d2
parentMerge branch 'master' into careminster (diff)
parentImplement the groups module query to make the estate allowed groups work (diff)
downloadopensim-SC-1597e33549b38435b1727ddafa89bc9e9bd404da.zip
opensim-SC-1597e33549b38435b1727ddafa89bc9e9bd404da.tar.gz
opensim-SC-1597e33549b38435b1727ddafa89bc9e9bd404da.tar.bz2
opensim-SC-1597e33549b38435b1727ddafa89bc9e9bd404da.tar.xz
Merge branch 'master' into careminster
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index adf5f02..62d4aee 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3557,8 +3557,35 @@ namespace OpenSim.Region.Framework.Scenes
3557 return false; 3557 return false;
3558 } 3558 }
3559 3559
3560 IGroupsModule groupsModule =
3561 RequestModuleInterface<IGroupsModule>();
3562
3563 List<UUID> agentGroups = new List<UUID>();
3564
3565 if (groupsModule != null)
3566 {
3567 GroupMembershipData[] GroupMembership =
3568 groupsModule.GetMembershipData(agent.AgentID);
3569
3570 for (int i = 0; i < GroupMembership.Length; i++)
3571 agentGroups.Add(GroupMembership[i].GroupID);
3572 }
3573
3574 bool groupAccess = false;
3575 UUID[] estateGroups = m_regInfo.EstateSettings.EstateGroups;
3576
3577 foreach (UUID group in estateGroups)
3578 {
3579 if (agentGroups.Contains(group))
3580 {
3581 groupAccess = true;
3582 break;
3583 }
3584 }
3585
3560 if (!m_regInfo.EstateSettings.PublicAccess && 3586 if (!m_regInfo.EstateSettings.PublicAccess &&
3561 !m_regInfo.EstateSettings.HasAccess(agent.AgentID)) 3587 !m_regInfo.EstateSettings.HasAccess(agent.AgentID) &&
3588 !groupAccess)
3562 { 3589 {
3563 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", 3590 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate",
3564 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3591 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);