-
Notifications
You must be signed in to change notification settings - Fork 66
EPMRPP-95208 activate invitation #2196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -115,15 +115,14 @@ public static MultiValuedMap<String, MultipartFile> getUploadedFiles(HttpServlet | |||
return uploadedFiles; | |||
} | |||
|
|||
public static Direction parseSortDirection(Order order) { | |||
public static Direction parseSortDirection(String order) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
} | ||
|
||
public static Pageable getPageable(String sortBy, Order order, int offset, int limit) { | ||
public static Pageable getPageable(String sortBy, String order, int offset, int limit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
|
||
var projects = getDeduplicatedProjectList(request); | ||
|
||
// validate projects | ||
projects.forEach(project -> { | ||
var projectEntity = projectRepository.findById(project.getId()) | ||
.orElseThrow( | ||
() -> new ReportPortalException(ErrorType.PROJECT_NOT_FOUND, project.getId())); | ||
.orElseThrow(() -> new ReportPortalException(ErrorType.PROJECT_NOT_FOUND, project.getId())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 102).
expect(projectEntity.getOrganizationId(), equalTo(orgId)).verify(BAD_REQUEST_ERROR, | ||
formattedSupplier("Project '{}' does not belong to organization {}", project.getId(), | ||
orgId) | ||
formattedSupplier("Project '{}' does not belong to organization {}", project.getId(), orgId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 102).
@@ -155,12 +153,11 @@ public UserAssignmentResponse assignUser(Long orgId, OrgUserAssignment request, | |||
.message("User %s has been successfully assigned".formatted(assignedUser.getLogin())); | |||
} | |||
|
|||
private void saveOrganizationUser(Organization organization, User assignedUser, | |||
OrgUserAssignment request) { | |||
public void saveOrganizationUser(Organization organization, User assignedUser, String role) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
var projectEntity = projectRepository.findById(projectId) | ||
.orElseThrow(() -> new ReportPortalException(ErrorType.PROJECT_NOT_FOUND, projectId)); | ||
expect(projectEntity.getOrganizationId(), equalTo(orgId)).verify(BAD_REQUEST_ERROR, | ||
formattedSupplier("Project '{}' does not belong to organization {}", projectId, orgId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 102).
|
||
projectUserRepository.save(new ProjectUser() | ||
.withProject(projectEntity) | ||
.withProjectRole(com.epam.ta.reportportal.entity.project.ProjectRole.valueOf(project.get("role").toString())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 125).
} | ||
} | ||
|
||
public void saveOrganizationUser(Organization organization, User assignedUser, String role) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a Javadoc comment.
user.setUuid(UUID.randomUUID()); | ||
user.setRole(UserRole.USER); | ||
user.setLogin(login); | ||
ofNullable(bid.getEmail()).map(String::trim).map(EntityUtils::normalizeId).ifPresent(user::setEmail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 111).
@@ -69,4 +70,11 @@ public ResponseEntity<Invitation> getInvitationsId(String invitationId) { | |||
|
|||
} | |||
|
|||
@Override | |||
public ResponseEntity<Invitation> putInvitationsId(String invitationId, InvitationActivation invitationActivation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is longer than 100 characters (found 118).
No description provided.