Answers if <code>group</code> contains <code>member</code>.

@return boolean
@param group org.apereo.portal.groups.IEntityGroup
@param member org.apereo.portal.groups.IGroupMember
500366
@Override
    public boolean contains(IEntityGroup group, IGroupMember member) throws GroupsException {
        boolean found = false;
        Iterator itr = (member.isGroup()) ? findMemberGroups(group) : findEntitiesForGroup(group);
        while (itr.hasNext() && !found) {
            found = member.equals(itr.next());
        }
        return found;
    }
307497
public void deleteGroupMember(GitlabGroup group, GitlabUser user) throws IOException {
        deleteGroupMember(group.getId(), user.getId());
    }
499858
public boolean containsCommandGroup(String groupId) {
        if (commandMap.get(groupId) instanceof CommandGroup) {
            return true;
        }
        if (parent != null) {
            return parent.containsCommandGroup(groupId);
        }
        return false;
    }
684611
def isMember(userid, password, group):
    
    try:
        certfile = getCert(userid, password)

        group_url = getGroupsURL(certfile, group)
        logging.debug("group url: %s" % ( group_url))

        con = httplib.HTTPSConnection(_SERVER,
                                      443,
                                      key_file=certfile.name,
                                      cert_file=certfile.name,
                                      timeout=600)

        con.connect()
        con.request("GET", group_url)
        resp = con.getresponse()
        if resp.status == 200:
            return True
    except Exception as e:
        logging.error(str(e))

    #logging.debug(str(resp.status))

    return False
849149
private Membership findMembershipByUserGroupAndType(Session session, String userName, String groupId, String type)
      throws Exception
   {
      MembershipImpl membership = getFromCache(userName, groupId, type);
      if (membership != null)
      {
         return membership;
      }

      try
      {
         Node groupNode = utils.getGroupNode(session, groupId);

         Node refUserNode = groupNode.getNode(JCROrganizationServiceImpl.JOS_MEMBERSHIP).getNode(userName);
         Node refTypeNode =
            refUserNode.getNode(type.equals(MembershipTypeHandler.ANY_MEMBERSHIP_TYPE)
               ? JCROrganizationServiceImpl.JOS_MEMBERSHIP_TYPE_ANY : type);

         String id = utils.composeMembershipId(groupNode, refUserNode, refTypeNode);

         membership = new MembershipImpl();
         membership.setGroupId(groupId);
         membership.setUserName(userName);
         membership.setMembershipType(type);
         membership.setId(id);

         putInCache(membership);

         return membership;
      }
      catch (PathNotFoundException e)
      {
         return null;
      }
   }
1246452
private static boolean contains(Object[] arr, Object member) {
        for (Object mem : arr) {
            if (Objects.equals(mem, member)) {
                return true;
            }
        }
        return false;
    }
1173262
def member_of(self, group):
        
        if isinstance(group, Group):
            group = group.name
        return self.groups.filter(name=group).exists()
392846
protected boolean generateJvmMembers(List<? extends JvmMember> members, ExtraLanguageAppendable it,
			IExtraLanguageGeneratorContext context) {
		for (final JvmMember member : members) {
			if (!(member instanceof JvmConstructor)) {
				if (context.getCancelIndicator().isCanceled()) {
					return false;
				}
				generate(member, it, context);
			}
		}
		return true;
	}
966740
@Override
    public Iterator findMembers(IEntityGroup eg) throws GroupsException {
        Collection members = new ArrayList(10);
        Iterator it = null;

        for (it = findMemberGroups(eg); it.hasNext(); ) {
            members.add(it.next());
        }
        for (it = findMemberEntities(eg); it.hasNext(); ) {
            members.add(it.next());
        }

        return members.iterator();
    }
975125
public boolean sismember(Object key, Object member) {
		Jedis jedis = getJedis();
		try {
			return jedis.sismember(keyToBytes(key), valueToBytes(member));
		}
		finally {close(jedis);}
	}
780631
def has_membership(self, user, role):
        
        targetRecord = AuthMembership.objects(creator=self.client, user=user).first()
        if targetRecord:
            return role in [i.role for i in targetRecord.groups]
        return False
845835
public static boolean nonPublicMemberFound(ProgramElementDoc[] members) {
        for (int i = 0; i < members.length; i++) {
            if (!members[i].isPublic()) {
                return true;
            }
        }
        return false;
    }
573845
boolean isMetadataGroupLeader() {
        CPMemberInfo localCPMember = getLocalCPMember();
        if (localCPMember == null) {
            return false;
        }
        RaftNode raftNode = raftService.getRaftNode(getMetadataGroupId());
        return raftNode != null && !raftNode.isTerminatedOrSteppedDown() && localCPMember.equals(raftNode.getLeader());
    }
1281697
def _Members(self, group):
    """"""
    group.members = set(group.members).union(self.gids.get(group.gid, []))
    return group
899759
private boolean isGroupMember(final String filter, final File candidate) {
    final String fileName = candidate.getName();
    final int lastDot = fileName.lastIndexOf('.');
    if (lastDot >= 0 && lastDot < fileName.length() - 1) {
      final String extension = ";" + fileName.substring(lastDot + 1).toLowerCase() + ";";
      final String semiFilter = ";" + filter + ";";
      return semiFilter.contains(extension);
    }
    return false;
  }
1285706
@Override
    public Iterator findParentGroups(IGroupMember gm) throws GroupsException {
        log.debug("Finding containing groups for member {}", gm.getKey());
        Collection groups = new ArrayList(10);
        IEntityGroup group = null;
        for (Iterator it = getGroupStore().findParentGroups(gm); it.hasNext(); ) {
            group = (IEntityGroup) it.next();
            group.setLocalGroupService(this);
            groups.add(group);
            if (cacheInUse()) {
                try {
                    if (getGroupFromCache(group.getEntityIdentifier().getKey()) == null) {
                        cacheAdd(group);
                    }
                } catch (CachingException ce) {
                    throw new GroupsException("Problem finding containing groups", ce);
                }
            }
        }
        return groups.iterator();
    }
146913
@Override
    public boolean hasMembersToDocument() {
        if (utils.isAnnotationType(typeElement)) {
            return !utils.getAnnotationMethods(typeElement).isEmpty();
        }
        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
            VisibleMemberMap members = getVisibleMemberMap(kind);
            if (!members.noVisibleMembers()) {
                return true;
            }
        }
        return false;
    }