Adds multiple users to a specific group at once

        :param group_jid: The group into which to join the users
        :param peer_jids: a list (or a single string) of JIDs to add to the group
342951
def add_members(self, group_jid, peer_jids: Union[str, List[str]]):
        
        log.info("[+] Adding some members to the group {}".format(group_jid))
        return self._send_xmpp_element(group_adminship.AddMembersRequest(group_jid, peer_jids))
102591
def unban_member_from_group(self, group_jid, peer_jid):
        
        log.info("[+] Requesting un-banning of user {} from the group {}".format(peer_jid, group_jid))
        return self._send_xmpp_element(group_adminship.UnbanRequest(group_jid, peer_jid))
948533
def add_group(id, description=None):
    

    if not description:
        description = id
    data = {
        'description': description
    }
    acl_url = urljoin(_acl_url(), 'groups/{}'.format(id))
    try:
        r = http.put(acl_url, json=data)
        assert r.status_code == 201
    except DCOSHTTPException as e:
        if e.response.status_code != 409:
            raise
304877
function addPeers(peers){
  var peersDIV = '';
  peers.forEach(p => {
    peersDIV += `<div class='radio'>
                    <label>
                      <input type="radio" name="peerList" id="${p}" value="${p}">
                      ${p}
                    </label>
                  </div>`
  });
  $('#peerListContainer').append(peersDIV)
}
1258919
def promote_to_admin(self, group_jid, peer_jid):
        
        log.info("[+] Promoting user {} to admin in group {}".format(peer_jid, group_jid))
        return self._send_xmpp_element(group_adminship.PromoteToAdminRequest(group_jid, peer_jid))
289389
def create_group(groupname, gid, system=True):
    
    sudo(addgroup(groupname, gid, system))
87522
def add_user_to_group(iam_client, user, group, quiet = False):
    
    if not quiet:
        printInfo('Adding user to group %s...' % group)
    iam_client.add_user_to_group(GroupName = group, UserName = user)
407994
public void addPeerDiscovery(PeerDiscovery peerDiscovery) {
        lock.lock();
        try {
            if (getMaxConnections() == 0)
                setMaxConnections(DEFAULT_CONNECTIONS);
            peerDiscoverers.add(peerDiscovery);
        } finally {
            lock.unlock();
        }
    }
366039
def group_members(self, group):
        
        if self._version < (6, 0, 0):
            raise NotImplementedError(
                "Group members is not implemented in JIRA before version 6.0, upgrade the instance, if possible.")

        params = {'groupname': group, 'expand': "users"}
        r = self._get_json('group', params=params)
        size = r['users']['size']
        end_index = r['users']['end-index']

        while end_index < size - 1:
            params = {'groupname': group, 'expand': "users[%s:%s]" % (
                end_index + 1, end_index + 50)}
            r2 = self._get_json('group', params=params)
            for user in r2['users']['items']:
                r['users']['items'].append(user)
            end_index = r2['users']['end-index']
            size = r['users']['size']

        result = {}
        for user in r['users']['items']:
            result[user['key']] = {'name': user['name'],
                                   'fullname': user['displayName'],
                                   'email': user.get('emailAddress', 'hidden'),
                                   'active': user['active']}
        return OrderedDict(sorted(result.items(), key=lambda t: t[0]))
804292
def update_member(self, member_id, peer_urls):
        
        member_update_request = etcdrpc.MemberUpdateRequest(ID=member_id,
                                                            peerURLs=peer_urls)
        self.clusterstub.MemberUpdate(
            member_update_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )
586429
def idSet(peer)
      @peersById.each do |e| 
        return if e.eql?(peer)
      end
      @peersById.pushToList(peer.trackerPeer.id, peer)
    end
985224
def canonical_new_peer_list( self, peers_to_add ):
        
        new_peers = list(set(self.new_peers + peers_to_add))
        random.shuffle( new_peers )
        
        # canonicalize
        tmp = []
        for peer in new_peers:
            tmp.append( self.canonical_peer(peer) )

        new_peers = tmp

        # don't talk to myself
        if self.my_hostport in new_peers:
            new_peers.remove(self.my_hostport)

        return new_peers
179609
def addgroupmember(self, group_id, user_id, access_level):
        
        if not isinstance(access_level, int):
            if access_level.lower() == 'owner':
                access_level = 50
            elif access_level.lower() == 'master':
                access_level = 40
            elif access_level.lower() == 'developer':
                access_level = 30
            elif access_level.lower() == 'reporter':
                access_level = 20
            elif access_level.lower() == 'guest':
                access_level = 10
            else:
                return False

        data = {'id': group_id, 'user_id': user_id, 'access_level': access_level}

        request = requests.post(
            '{0}/{1}/members'.format(self.groups_url, group_id),
            headers=self.headers, data=data, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        return request.status_code == 201
223352
def addPeer(self):
        
        self._openRepo()
        try:
            peer = peers.Peer(
                self._args.url, json.loads(self._args.attributes))
        except exceptions.BadUrlException:
            raise exceptions.RepoManagerException("The URL for the peer was "
                                                  "malformed.")
        except ValueError as e:
            raise exceptions.RepoManagerException(
                "The attributes message "
                "was malformed. {}".format(e))
        self._updateRepo(self._repo.insertPeer, peer)
514112
def cli(ctx, group, user):
    
    return ctx.gi.users.add_to_group(group, user)
126077
def AddGroupMemberships(self):
    """"""
    self.groups = {g.name: self._Members(g) for g in itervalues(self.groups)}
    # Map the groups a user is a member of, irrespective of primary/extra gid.
    for g in itervalues(self.groups):
      for user in g.members:
        membership = self.memberships.setdefault(user, set())
        membership.add(g.gid)
    # Now add the completed membership to the user account.
    for user in itervalues(self.entry):
      user.gids = self.memberships.get(user.username)
1277465
private void onPublicKeysGroupAdded(int uid, ApiEncryptionKeyGroup keyGroup) {
        UserKeys userKeys = getCachedUserKeys(uid);
        if (userKeys == null) {
            return;
        }
        UserKeysGroup validatedKeysGroup = validateUserKeysGroup(uid, keyGroup);
        if (validatedKeysGroup != null) {
            UserKeys updatedUserKeys = userKeys.addUserKeyGroup(validatedKeysGroup);
            cacheUserKeys(updatedUserKeys);
            context().getEncryption().getEncryptedChatManager(uid)
                    .send(new EncryptedPeerActor.KeyGroupUpdated(userKeys));
        }
    }