returns all the group applications to join
422803
def applications(self):
        """"""
        url = self._url + "/applications"
        params = {"f" : "json"}
        res = self._get(url=url,
                           param_dict=params,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port)
        items = []
        if "applications" in res.keys():
            for apps in res['applications']:
                items.append(
                    self.Application(url="%s/%s" % (self._url, apps['username']),
                                     securityHandler=self._securityHandler,
                                     proxy_url=self._proxy_url,
                                     proxy_port=self._proxy_port)
                )
        return items
941205
def group_memberships(self, group_id, **kwargs):
        ""
        api_path = "/api/v2/groups/{group_id}/memberships.json"
        api_path = api_path.format(group_id=group_id)
        return self.call(api_path, **kwargs)
223645
public function findAllGroups()
    {
        try {
            $qb = $this->createQueryBuilder('grp');
            $query = $qb->getQuery();

            $result = $query->getResult();

            return $result;
        } catch (NoResultException $ex) {
            return;
        }
    }
7901
def get_groupnames(self, sgs):
        
        return ','.join([sgs[sg].get_name() for sg in self.servicegroups])
606457
def group_members(self, group_id, include_orphans=False):
        
        params = {'includeOrphans': str(include_orphans).lower()}
        url = self._service_url(['triggers', 'groups', group_id, 'members'], params=params)
        return Trigger.list_to_object_list(self._get(url))
941219
def joined_groups
      NippoCore::Group.joins(:group_member_relations)
                      .where(nippo_core_group_member_relations: {user_id: id})
                      .where.not(nippo_core_group_member_relations: {accepted_at: nil})
    end
131544
def get_groups(self):
        
        response = self.client.list_groups(UserPoolId=self.user_pool_id)
        return [self.get_group_obj(group_data)
                for group_data in response.get('Groups')]
199524
function groupMembershipMiddleware(groups) {
		if (typeof groups === 'string') {
			groups = [groups];
		}
		return function hasGroupMembership(req, res, next) {
			if (req.locals.user) {
				const userGroups = req.locals.user.groups || [];
				for (let group of groups) {
					if (userGroups.indexOf(group) !== -1) {
						debug(`User has the '${group}' Group.`);
						return next();
					}
				}
			}
			debug(`User is not a member of one of [${groups.join(',')}] Group(s).`);
			next(new restifyErrors.ForbiddenError('No execute permissions on endpoint'));
		}
	}
232115
def get_groups(options = {})
      limit = options[:limit] || 1000000
      response = make_request(:get, group + "#{options[:extra]}" + "?startGroup=#{options[:start]}", headers: {'content-type' => 'application/atom+xml'})
      pages = fetch_pages(response, limit, :feed)

      return_all(pages)
    end
129687
function getAllGroups(connections, options, cb) {
  var conn = connections.mongooseConnection;
  var groupsModel = models.get(conn, models.MODELNAMES.GROUPS);
  groupsModel.find().exec(function(err, groupsList) {
    if (err) {
      return cb(err);
    }
    return cb(null, groupsList || []); // Note: purposely returning empty array here for now, maybe this should be null instead?
  });
}
685969
def sqlvm_group_list(
        client,
        resource_group_name=None):
    '''
    
    '''
    if resource_group_name:
        # List all sql vm groups in the resource group
        return client.list_by_resource_group(resource_group_name=resource_group_name)

    # List all sql vm groups in the subscription
    return client.list()
724659
def groups_pools_getGroups():
    """"""
    method = 'flickr.groups.pools.getGroups'
    data = _doget(method, auth=True)
    groups = []
    if isinstance(data.rsp.groups.group, list):
        for group in data.rsp.groups.group:
            groups.append(Group(group.id, name=group.name, \
                                privacy=group.privacy))
    else:
        group = data.rsp.groups.group
        groups = [Group(group.id, name=group.name, privacy=group.privacy)]
    return groups
485109
def fetch_groups(groups):
    
    hidden_groups = current_app.config.get(
        'OAUTHCLIENT_CERN_HIDDEN_GROUPS', OAUTHCLIENT_CERN_HIDDEN_GROUPS)
    hidden_groups_re = current_app.config.get(
        'OAUTHCLIENT_CERN_HIDDEN_GROUPS_RE',
        OAUTHCLIENT_CERN_HIDDEN_GROUPS_RE)
    groups = [group for group in groups if group not in hidden_groups]
    filter_groups = []
    for regexp in hidden_groups_re:
        for group in groups:
            if regexp.match(group):
                filter_groups.append(group)
    groups = [group for group in groups if group not in filter_groups]

    return groups
505322
def get_group_members(self, group):
        

        conn = self.bind
        try:
            records = conn.search_s(
                current_app.config['LDAP_BASE_DN'], ldap.SCOPE_SUBTREE,
                ldap_filter.filter_format(
                    current_app.config['LDAP_GROUP_OBJECT_FILTER'], (group,)),
                [current_app.config['LDAP_GROUP_MEMBERS_FIELD']])
            conn.unbind_s()
            if records:
                if current_app.config['LDAP_GROUP_MEMBERS_FIELD'] in \
                        records[0][1]:
                    members = records[0][1][
                        current_app.config['LDAP_GROUP_MEMBERS_FIELD']]
                    if sys.version_info[0] > 2:
                        members = [m.decode('utf-8') for m in members]
                    return members
        except ldap.LDAPError as e:
            raise LDAPException(self.error(e.args))
828795
def group_memberships(self, user, include=None):
        
        return self._query_zendesk(self.endpoint.group_memberships, 'group_membership', id=user, include=include)
1088463
private function get_groups_all() {
        if (is_null($this->groups)) {
            // NOTE: Performance could be improved here. The system caches user groups
            // in $USER->groupmember[$courseid] => array of groupid=>groupid. Unfortunately this
            // structure does not include grouping information. It probably could be changed to
            // do so, without a significant performance hit on login, thus saving this one query
            // each request.
            $this->groups = groups_get_user_groups($this->course->id, $this->userid);
        }
        return $this->groups;
    }
961085
def group_list():
    '''
    
    '''
    ret = {'installed': [],
           'available': [],
           'installed environments': [],
           'available environments': [],
           'available languages': {}}

    section_map = {
        'installed groups:': 'installed',
        'available groups:': 'available',
        'installed environment groups:': 'installed environments',
        'available environment groups:': 'available environments',
        'available language groups:': 'available languages',
    }

    out = __salt__['cmd.run_stdout'](
        [_yum(), 'grouplist', 'hidden'],
        output_loglevel='trace',
        python_shell=False
    )
    key = None
    for line in salt.utils.itertools.split(out, '\n'):
        line_lc = line.lower()
        if line_lc == 'done':
            break

        section_lookup = section_map.get(line_lc)
        if section_lookup is not None and section_lookup != key:
            key = section_lookup
            continue

        # Ignore any administrative comments (plugin info, repo info, etc.)
        if key is None:
            continue

        line = line.strip()
        if key != 'available languages':
            ret[key].append(line)
        else:
            match = re.match(r'(.+) \[(.+)\]', line)
            if match:
                name, lang = match.groups()
                ret[key][line] = {'name': name, 'language': lang}
    return ret