aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups/Service
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Addons/Groups/Service')
-rw-r--r--OpenSim/Addons/Groups/Service/GroupsService.cs19
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs
index a2ef13a..294b89a 100644
--- a/OpenSim/Addons/Groups/Service/GroupsService.cs
+++ b/OpenSim/Addons/Groups/Service/GroupsService.cs
@@ -255,13 +255,20 @@ 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 m_log.DebugFormat("[ZZZ]: AgentID is {0}. checkVisibility is {1}", RequestingAgentID, checkVisibility);
262 if (checkVisibility)
263 {
264 // Is the requester a member of the group?
265 bool isInGroup = false;
266 if (m_Database.RetrieveMember(GroupID, RequestingAgentID) != null)
267 isInGroup = true;
262 268
263 if (!isInGroup) // reduce the roles to the visible ones 269 if (!isInGroup) // reduce the roles to the visible ones
264 rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0); 270 rolesList = rolesList.FindAll(r => (UInt64.Parse(r.Data["Powers"]) & (ulong)GroupPowers.MemberVisible) != 0);
271 }
265 272
266 MembershipData[] datas = m_Database.RetrieveMembers(GroupID); 273 MembershipData[] datas = m_Database.RetrieveMembers(GroupID);
267 if (datas == null || (datas != null && datas.Length == 0)) 274 if (datas == null || (datas != null && datas.Length == 0))