diff options
Diffstat (limited to 'OpenSim/Addons/Groups/Service/GroupsService.cs')
-rw-r--r-- | OpenSim/Addons/Groups/Service/GroupsService.cs | 18 |
1 files changed, 12 insertions, 6 deletions
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)) |