Search in sources :

Example 1 with RoleAssignments

use of jetbrains.buildServer.server.rest.model.user.RoleAssignments in project teamcity-rest by JetBrains.

the class GroupRequest method setRoles.

@PUT
@Path("/{groupLocator}/roles")
@Consumes({ "application/xml", "application/json" })
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Update roles of the matching user group.", nickname = "setGroupRoles")
public RoleAssignments setRoles(@PathParam("groupLocator") String groupLocator, RoleAssignments roleAssignments) {
    SUserGroup group = myUserGroupFinder.getGroup(groupLocator);
    Group.setRoles(group, roleAssignments, myBeanContext.getServiceLocator());
    return new RoleAssignments(group.getRoles(), group, myBeanContext);
}
Also used : SUserGroup(jetbrains.buildServer.groups.SUserGroup) RoleAssignments(jetbrains.buildServer.server.rest.model.user.RoleAssignments) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

ApiOperation (io.swagger.annotations.ApiOperation)1 SUserGroup (jetbrains.buildServer.groups.SUserGroup)1 RoleAssignments (jetbrains.buildServer.server.rest.model.user.RoleAssignments)1