Group based access restrictions to parcels require group membership, but not that this group is active for that user.

0.7.4.1
Snoopy Pfeffer 2012-04-05 10:25:54 +02:00
parent 600a86bcae
commit e4406c846d
1 changed files with 23 additions and 26 deletions

View File

@ -423,9 +423,6 @@ namespace OpenSim.Region.CoreModules.World.Land
public bool HasGroupAccess(UUID avatar) public bool HasGroupAccess(UUID avatar)
{ {
if (LandData.GroupID != UUID.Zero && (LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup) if (LandData.GroupID != UUID.Zero && (LandData.Flags & (uint)ParcelFlags.UseAccessGroup) == (uint)ParcelFlags.UseAccessGroup)
{
ScenePresence sp;
if (!m_scene.TryGetScenePresence(avatar, out sp))
{ {
bool isMember; bool isMember;
if (m_groupMemberCache.TryGetValue(avatar, out isMember)) if (m_groupMemberCache.TryGetValue(avatar, out isMember))
@ -433,7 +430,10 @@ namespace OpenSim.Region.CoreModules.World.Land
IGroupsModule groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); IGroupsModule groupsModule = m_scene.RequestModuleInterface<IGroupsModule>();
if (groupsModule == null) if (groupsModule == null)
{
m_groupMemberCache.Add(avatar, false, m_groupMemberCacheTimeout);
return false; return false;
}
GroupMembershipData[] membership = groupsModule.GetMembershipData(avatar); GroupMembershipData[] membership = groupsModule.GetMembershipData(avatar);
if (membership == null || membership.Length == 0) if (membership == null || membership.Length == 0)
@ -453,9 +453,6 @@ namespace OpenSim.Region.CoreModules.World.Land
m_groupMemberCache.Add(avatar, false, m_groupMemberCacheTimeout); m_groupMemberCache.Add(avatar, false, m_groupMemberCacheTimeout);
return false; return false;
} }
return sp.ControllingClient.IsGroupMember(LandData.GroupID);
}
return false; return false;
} }