diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 29 |
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); |