Skip to content

feature/orgs merge #373

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

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from
Draft

feature/orgs merge #373

wants to merge 24 commits into from

Conversation

grabsefx
Copy link
Contributor

No description provided.

grabsefx and others added 16 commits May 3, 2024 10:38
* EPMRPP-89966 refactor roles
* EPMRPP-90460 update dao
# Conflicts:
#	build.gradle
#	src/main/java/com/epam/reportportal/auth/event/UiAuthenticationSuccessEventHandler.java
#	src/main/java/com/epam/reportportal/auth/integration/builder/AuthIntegrationBuilder.java
#	src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java
# Conflicts:
#	build.gradle
# Conflicts:
#	build.gradle
#	src/main/java/com/epam/reportportal/auth/event/UiAuthenticationSuccessEventHandler.java
# Conflicts:
#	src/main/java/com/epam/reportportal/auth/event/UiAuthenticationSuccessEventHandler.java
# Conflicts:
#	build.gradle
#	src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/AuthIntegrationStrategy.java
# Conflicts:
#	.github/workflows/build-dev-image.yml
#	src/main/java/com/epam/reportportal/auth/entity/project/Project.java
#	src/main/java/com/epam/reportportal/auth/entity/user/User.java
@grabsefx grabsefx self-assigned this Apr 22, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

reviewdog

src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|27 col 1| Wrong lexicographical order for 'com.epam.reportportal.auth.entity.user.UserRole' import. Should be before 'com.epam.reportportal.auth.rules.exception.ReportPortalException'.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|65| Line is longer than 100 characters (found 108).
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|90 col 3| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|110 col 5| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|131 col 7| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|137| Line is longer than 100 characters (found 104).
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|147 col 5| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|173 col 7| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|204 col 9| Missing a Javadoc comment.
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|211| Line is longer than 100 characters (found 101).
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|276| Line is longer than 100 characters (found 114).
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|296| Line is longer than 100 characters (found 106).
src/main/java/com/epam/reportportal/auth/commons/ReportPortalUser.java|303 col 59| '(' is preceded with whitespace.

import java.util.Optional;
import lombok.Getter;

/**

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.SummaryJavadocCheck> reported by reviewdog 🐶
Summary javadoc is missing.

return this.roleLevel <= other.roleLevel;
}

public static Optional<OrganizationRole> forName(final String name) {

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.

import com.epam.reportportal.auth.entity.enums.OrganizationType;
import java.io.Serializable;
import java.time.Instant;
import jakarta.persistence.Column;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'jakarta.persistence.Column' import. Should be before 'java.time.Instant'.

import java.io.Serializable;
import java.time.Instant;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'jakarta.persistence.Convert' import. Should be before 'java.time.Instant'.

import java.time.Instant;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'jakarta.persistence.Entity' import. Should be before 'java.time.Instant'.

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.JdbcType;
import org.hibernate.annotations.Type;
import org.hibernate.dialect.PostgreSQLEnumJdbcType;
import org.hibernate.annotations.UpdateTimestamp;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'org.hibernate.annotations.UpdateTimestamp' import. Should be before 'org.hibernate.dialect.PostgreSQLEnumJdbcType'.

MEMBER(2, "Member"),
PROJECT_MANAGER(3, "Project manager");
VIEWER(0, "Viewer"),
EDITOR (1, "Editor");

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.whitespace.MethodParamPadCheck> reported by reviewdog 🐶
'(' is preceded with whitespace.

import com.epam.reportportal.auth.rules.exception.ErrorType;
import com.epam.reportportal.auth.rules.exception.ReportPortalException;
import com.epam.reportportal.auth.entity.organization.OrganizationRole;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'com.epam.reportportal.auth.entity.organization.OrganizationRole' import. Should be before 'com.epam.reportportal.auth.rules.exception.ReportPortalException'.

import com.epam.reportportal.auth.rules.exception.ErrorType;
import com.epam.reportportal.auth.rules.exception.ReportPortalException;
import com.epam.reportportal.auth.entity.organization.OrganizationRole;
import com.epam.reportportal.auth.entity.project.ProjectRole;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'com.epam.reportportal.auth.entity.project.ProjectRole' import. Should be before 'com.epam.reportportal.auth.rules.exception.ReportPortalException'.

import com.epam.reportportal.auth.rules.exception.ErrorType;
import com.epam.reportportal.auth.rules.exception.ReportPortalException;
import com.epam.reportportal.auth.entity.organization.OrganizationRole;
import com.epam.reportportal.auth.entity.project.ProjectRole;
import com.epam.reportportal.auth.entity.user.ProjectUser;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'com.epam.reportportal.auth.entity.user.ProjectUser' import. Should be before 'com.epam.reportportal.auth.rules.exception.ReportPortalException'.

import com.epam.reportportal.auth.entity.organization.OrganizationRole;
import com.epam.reportportal.auth.entity.project.ProjectRole;
import com.epam.reportportal.auth.entity.user.ProjectUser;
import com.epam.reportportal.auth.entity.user.UserRole;

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.imports.CustomImportOrderCheck> reported by reviewdog 🐶
Wrong lexicographical order for 'com.epam.reportportal.auth.entity.user.UserRole' import. Should be before 'com.epam.reportportal.auth.rules.exception.ReportPortalException'.


private ReportPortalUser(String username, String password,
Collection<? extends GrantedAuthority> authorities, Long userId,
UserRole role, Map<String, ProjectDetails> projectDetails, String email, boolean isActive) {
UserRole role, Map<String, OrganizationDetails> organizationDetails, String email, boolean isActive) {

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 108).


public static class ProjectDetails implements Serializable {
@Getter

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.MissingJavadocTypeCheck> reported by reviewdog 🐶
Missing a Javadoc comment.

public String getProjectName() {
return projectName;
}
public static class OrganizationDetailsBuilder {

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.MissingJavadocTypeCheck> reported by reviewdog 🐶
Missing a Javadoc comment.

return this;
}

public ProjectDetailsBuilder withProjectName(String projectName) {
this.projectName = projectName;
public OrganizationDetailsBuilder withOrganizationRole(String orgRole) {

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.

return this;
}

public ProjectDetailsBuilder withProjectRole(String projectRole) {

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 ProjectDetails build() {
return new ProjectDetails(projectId, projectName, projectKey, projectRole, organizationId);

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 101).

@@ -230,8 +273,8 @@ public ReportPortalUserBuilder withEmail(String email) {
return this;
}

public ReportPortalUserBuilder withProjectDetails(Map<String, ProjectDetails> projectDetails) {
this.projectDetails = projectDetails;
public ReportPortalUserBuilder withOrganizationDetails(Map<String, OrganizationDetails> organizationDetails) {

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 114).

it -> OrganizationDetails.builder()
.withOrgId(it.getOrganization().getId())
.withOrganizationRole(it.getOrganizationRole().name())
.withProjectDetails(mapProjectDetails(user.getProjects(), it.getOrganization().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 106).

return build();
}

private Map<String, ProjectDetails> mapProjectDetails (Set<ProjectUser> projects, Long 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.whitespace.MethodParamPadCheck> reported by reviewdog 🐶
'(' is preceded with whitespace.

raikbitters and others added 6 commits April 25, 2025 17:11
* Refactor GitHub user synchronization to use email for user identification

* Refactor LDAP user replication to use email for user identification

* Refactor SAML user replication to improve email handling and user creation logic

* Refactor error messages and update user activity event publishing logic
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants