Skip to content

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

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

grabsefx
Copy link
Contributor

No description provided.

@grabsefx grabsefx self-assigned this Mar 18, 2025
@grabsefx grabsefx requested a review from pbortnik as a code owner March 18, 2025 11:58
@@ -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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶
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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶
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()));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶
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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
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()))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 125).

}
}

public void saveOrganizationUser(Organization organization, User assignedUser, String role) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck> reported by reviewdog 🐶
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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck> reported by reviewdog 🐶
Line is longer than 100 characters (found 118).

@grabsefx grabsefx merged commit 97ed618 into feature/orgs Mar 18, 2025
8 checks passed
@grabsefx grabsefx deleted the EPMRPP-95208-activate-invitation branch March 18, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants