Adds the specified list of users as members of the project. Returns the updated project record.

@param  project The project to add members to.
@return Request object
969057
public ItemRequest<Project> addMembers(String project) {
    
        String path = String.format("/projects/%s/addMembers", project);
        return new ItemRequest<Project>(this, Project.class, path, "POST");
    }
799782
public Observable<Project> updateProjectAsync(UUID projectId, Project updatedProject) {
        return updateProjectWithServiceResponseAsync(projectId, updatedProject).map(new Func1<ServiceResponse<Project>, Project>() {
            @Override
            public Project call(ServiceResponse<Project> response) {
                return response.body();
            }
        });
    }
418034
public static mpsuser add(nitro_service client, mpsuser resource) throws Exception
	{
		resource.validate("add");
		return ((mpsuser[]) resource.perform_operation(client, "add"))[0];
	}
741649
def persist_project(project):
    
    from benchbuild.utils.schema import Project, Session
    session = Session()
    projects = session.query(Project) \
        .filter(Project.name == project.name) \
        .filter(Project.group_name == project.group)

    name = project.name
    desc = project.__doc__
    domain = project.domain
    group_name = project.group
    version = project.version() \
        if callable(project.version) else project.version
    try:
        src_url = project.src_uri
    except AttributeError:
        src_url = 'unknown'

    if projects.count() == 0:
        newp = Project()
        newp.name = name
        newp.description = desc
        newp.src_url = src_url
        newp.domain = domain
        newp.group_name = group_name
        newp.version = version
        session.add(newp)
    else:
        newp_value = {
            "name": name,
            "description": desc,
            "src_url": src_url,
            "domain": domain,
            "group_name": group_name,
            "version": version
        }
        projects.update(newp_value)

    session.commit()
    return (projects, session)
547849
public GetByProjectResponse getByProject(GetByProjectRequest request) {
    return call(
      new GetRequest(path("get_by_project"))
        .setParam("organization", request.getOrganization())
        .setParam("project", request.getProject()),
      GetByProjectResponse.parser());
  }
1006069
public CollectionRequest<Section> findByProject(String project) {
    
        String path = String.format("/projects/%s/sections", project);
        return new CollectionRequest<Section>(this, Section.class, path, "GET");
    }
732921
def api_get_project_members(request, key=None, hproPk=True):
    """"""

    if not check_api_key(request, key, hproPk):
        return HttpResponseForbidden

    if settings.PIAPI_STANDALONE:
        if not settings.PIAPI_REALUSERS:
            users = [generate_user(pk="-1"), generate_user(pk="-2"), generate_user(pk="-3")]
        else:
            users = DUser.object.all()
    else:

        (_, _, hproject) = getPlugItObject(hproPk)

        users = []

        for u in hproject.getMembers():
            u.ebuio_member = True
            u.ebuio_admin = hproject.isMemberWrite(u)
            u.subscription_labels = _get_subscription_labels(u, hproject)
            users.append(u)

    liste = []

    for u in users:

        retour = {}

        for prop in settings.PIAPI_USERDATA:
            if hasattr(u, prop):
                retour[prop] = getattr(u, prop)

        retour['id'] = str(retour['pk'])

        liste.append(retour)

    return HttpResponse(json.dumps({'members': liste}), content_type="application/json")
1048228
def add_member(self, user):
        
        user = Transform.to_user(user)
        data = {
            'id': user
        }
        extra = {
            'resource': self.__class__.__name__,
            'query': {
                'id': self.id,
                'data': data,
            }
        }
        logger.info('Adding team member using id', extra=extra)
        response = self._api.post(
            url=self._URL['members_query'].format(id=self.id), data=data)
        member_data = response.json()
        return TeamMember(api=self._api, **member_data)
658052
def add_to_recent(self, project):
        
        if project not in self.recent_projects:
            self.recent_projects.insert(0, project)
            self.recent_projects = self.recent_projects[:10]
952892
private void addToTempProject(CmsObject adminCms, CmsObject userCms, CmsResource resource, CmsProject tmpProject)
    throws CmsException {

        // copy the resource to the project
        adminCms.copyResourceToProject(resource);

        // lock the resource in the current project
        CmsLock lock = userCms.getLock(resource);
        // prove is current lock from current but not in current project
        if ((lock != null)
            && lock.isOwnedBy(userCms.getRequestContext().getCurrentUser())
            && !lock.isOwnedInProjectBy(
                userCms.getRequestContext().getCurrentUser(),
                userCms.getRequestContext().getCurrentProject())) {
            // file is locked by current user but not in current project
            // change the lock from this file
            userCms.changeLock(resource);
        }
        // lock resource from current user in current project
        userCms.lockResource(resource);
        // get current lock
        lock = userCms.getLock(resource);
    }
118949
def prj_add_user(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        dialog = UserAdderDialog(project=self.cur_prj)
        dialog.exec_()
        users = dialog.users
        for user in users:
            userdata = djitemdata.UserItemData(user)
            treemodel.TreeItem(userdata, self.prj_user_model.root)
        self.cur_prj.save()
1297316
def update_project(project,**kwargs):
    

    user_id = kwargs.get('user_id')
    #check_perm(user_id, 'update_project')
    proj_i = _get_project(project.id)

    proj_i.check_write_permission(user_id)

    proj_i.name        = project.name
    proj_i.description = project.description

    attr_map = hdb.add_resource_attributes(proj_i, project.attributes)
    proj_data = _add_project_attribute_data(proj_i, attr_map, project.attribute_data)
    proj_i.attribute_data = proj_data
    db.DBSession.flush()

    return proj_i
603668
def get_project_members(machine, project_id):
    
    try:
        project = Project.objects.get(pid=project_id)
    except Project.DoesNotExist:
        return 'Project not found'

    return [x.username for x in project.group.members.all()]
1096082
public static br_adduser adduser(nitro_service client, br_adduser resource) throws Exception
	{
		return ((br_adduser[]) resource.perform_operation(client, "adduser"))[0];
	}
927360
public CompletableFuture<ProjectRole> findRole(String projectName, User user) {
        requireNonNull(projectName, "projectName");
        requireNonNull(user, "user");

        if (user.isAdmin()) {
            return CompletableFuture.completedFuture(ProjectRole.OWNER);
        }
        return getProject(projectName).thenApply(project -> {
            if (user instanceof UserWithToken) {
                final TokenRegistration registration = project.tokens().getOrDefault(
                        ((UserWithToken) user).token().id(), null);
                return registration != null ? registration.role() : ProjectRole.GUEST;
            } else {
                final Member member = project.memberOrDefault(user.id(), null);
                return member != null ? member.role() : ProjectRole.GUEST;
            }
        });
    }
487036
public ItemRequest<Section> createInProject(String project) {
    
        String path = String.format("/projects/%s/sections", project);
        return new ItemRequest<Section>(this, Section.class, path, "POST");
    }
649443
def add_accounts_to_project(accounts_query, project):
    

    query = accounts_query.filter(date_deleted__isnull=True)

    for account in query:
        add_account_to_project(account, project)