aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons
diff options
context:
space:
mode:
authorDiva Canto2013-07-28 16:44:31 -0700
committerDiva Canto2013-07-28 16:44:31 -0700
commitc442ef346eee83320d92ebc829cf3dec7bd2ed98 (patch)
tree805ebbf40ffaffd639440a4bfef0423828bbcf0a /OpenSim/Addons
parentFix an issue where HG members of groups weren't seeing the entire membership ... (diff)
downloadopensim-SC_OLD-c442ef346eee83320d92ebc829cf3dec7bd2ed98.zip
opensim-SC_OLD-c442ef346eee83320d92ebc829cf3dec7bd2ed98.tar.gz
opensim-SC_OLD-c442ef346eee83320d92ebc829cf3dec7bd2ed98.tar.bz2
opensim-SC_OLD-c442ef346eee83320d92ebc829cf3dec7bd2ed98.tar.xz
Same issue as previous commit.
Diffstat (limited to 'OpenSim/Addons')
-rw-r--r--OpenSim/Addons/Groups/GroupsMessagingModule.cs13
-rw-r--r--OpenSim/Addons/Groups/Service/GroupsService.cs18
2 files changed, 17 insertions, 14 deletions
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
index 3cece77..5de1fb4 100644
--- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs
+++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs
@@ -246,7 +246,7 @@ namespace OpenSim.Groups
246 public void SendMessageToGroup(GridInstantMessage im, UUID groupID) 246 public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
247 { 247 {
248 UUID fromAgentID = new UUID(im.fromAgentID); 248 UUID fromAgentID = new UUID(im.fromAgentID);
249 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(fromAgentID.ToString(), groupID); 249 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", groupID);
250 int groupMembersCount = groupMembers.Count; 250 int groupMembersCount = groupMembers.Count;
251 PresenceInfo[] onlineAgents = null; 251 PresenceInfo[] onlineAgents = null;
252 252
@@ -403,15 +403,12 @@ namespace OpenSim.Groups
403 Scene aScene = m_sceneList[0]; 403 Scene aScene = m_sceneList[0];
404 GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); 404 GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID);
405 405
406 // Let's find out who sent it 406 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", GroupID);
407 string requestingAgent = m_UserManagement.GetUserUUI(new UUID(msg.fromAgentID));
408
409 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(requestingAgent, GroupID);
410 List<UUID> alreadySeen = new List<UUID>(); 407 List<UUID> alreadySeen = new List<UUID>();
411 408
412 if (m_debugEnabled) 409 //if (m_debugEnabled)
413 foreach (GroupMembersData m in groupMembers) 410 // foreach (GroupMembersData m in groupMembers)
414 m_log.DebugFormat("[Groups.Messaging]: member {0}", m.AgentID); 411 // m_log.DebugFormat("[Groups.Messaging]: member {0}", m.AgentID);
415 412
416 foreach (Scene s in m_sceneList) 413 foreach (Scene s in m_sceneList)
417 { 414 {
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs
index a2ef13a..24eb7f3 100644
--- a/OpenSim/Addons/Groups/Service/GroupsService.cs
+++ b/OpenSim/Addons/Groups/Service/GroupsService.cs
@@ -255,13 +255,19 @@ namespace OpenSim.Groups
255 return members; 255 return members;
256 List<RoleData> rolesList = new List<RoleData>(roles); 256 List<RoleData> rolesList = new List<RoleData>(roles);
257 257
258 // Is the requester a member of the group? 258 // Check visibility?
259 bool isInGroup = false; 259 // When we don't want to check visibility, we pass it "all" as the requestingAgentID
260 if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null) 260 bool checkVisibility = !RequestingAgentID.Equals("all");
261 isInGroup = true; 261 if (checkVisibility)
262 {
263 // Is the requester a member of the group?
264 bool isInGroup = false;
265 if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null)
266 isInGroup = true;
262 267
263 if (!isInGroup) // reduce the roles to the visible ones 268 if (!isInGroup) // reduce the roles to the visible ones
264 rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0); 269 rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0);
270 }
265 271
266 MembershipData[] datas = m_Database.RetrieveMembers(GroupID); 272 MembershipData[] datas = m_Database.RetrieveMembers(GroupID);
267 if (datas == null || (datas != null && datas.Length == 0)) 273 if (datas == null || (datas != null && datas.Length == 0))