OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
/// <summary>
/// Get a list of groups memberships for the agent that are marked "ListInProfile"
/// (unless that agent has a godLike aspect, in which case get all groups)
/// </summary>
/// <param name="dataForAgentID"></param>
/// <returns></returns>
Get a list of groups memberships for the agent that are marked "ListInProfile"
(unless that agent has a godLike aspect, in which case get all groups)
Get a list of groups memberships for the agent that are marked " ListInProfile " ( unless that agent has a godLike aspect in which case get all groups )
private GroupMembershipData[] GetProfileListedGroupMemberships(IClientAPI requestingClient, UUID dataForAgentID)
        {
            List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(requestingClient.AgentId, dataForAgentID);
            GroupMembershipData[] membershipArray;
            Scene cScene = (Scene)requestingClient.Scene;
            bool isGod = cScene.Permissions.IsGod(requestingClient.AgentId);
            if (isGod)
            {
                membershipArray = membershipData.ToArray();
            }
            else
            {
                if (requestingClient.AgentId != dataForAgentID)
                {
                    Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
                    {
                        return membership.ListInProfile;
                    };
                    membershipArray = membershipData.FindAll(showInProfile).ToArray();
                }
                else
                {
                    membershipArray = membershipData.ToArray();
                }
            }
            if (m_debugEnabled)
            {
                m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId);
                foreach (GroupMembershipData membership in membershipArray)
                {
                    m_log.InfoFormat("[GROUPS]: {0} :: {1} - {2} - {3}", dataForAgentID, membership.GroupName, membership.GroupTitle, membership.GroupPowers);
                }
            }
            return membershipArray;
        }
private GroupMembershipData [ ] GetProfileListedGroupMemberships ( IClientAPI requestingClient , UUID dataForAgentID ) { List < GroupMembershipData > membershipData = m_groupData . GetAgentGroupMemberships ( requestingClient . AgentId , dataForAgentID ) ; GroupMembershipData [ ] membershipArray ; Scene cScene = ( Scene ) requestingClient . Scene ; bool isGod = cScene . Permissions . IsGod ( requestingClient . AgentId ) ; if ( isGod ) { membershipArray = membershipData . ToArray ( ) ; } else { if ( requestingClient . AgentId != dataForAgentID ) { Predicate < GroupMembershipData > showInProfile = delegate ( GroupMembershipData membership ) { return membership . ListInProfile ; } ; membershipArray = membershipData . FindAll ( showInProfile ) . ToArray ( ) ; } else { membershipArray = membershipData . ToArray ( ) ; } } if ( m_debugEnabled ) { m_log . InfoFormat ( " " , dataForAgentID , requestingClient . AgentId ) ; foreach ( GroupMembershipData membership in membershipArray ) { m_log . InfoFormat ( " " , dataForAgentID , membership . GroupName , membership . GroupTitle , membership . GroupPowers ) ; } } return membershipArray ; }
Get a list of groups memberships for the agent that are marked "ListInProfile"
(unless that agent has a godLike aspect, in which case get all groups)
Get a list of groups memberships for the agent that are marked " ListInProfile " ( unless that agent has a godLike aspect in which case get all groups )
//  cScene and property accessor 'isGod' are in support of the opertions to bypass 'hidden' group attributes for // those with a GodLike aspect.
None
requestingClient
IClientAPI
dataForAgentID
UUID
None