diff --git a/src/main/java/com/epam/reportportal/auth/integration/github/GitHubUserReplicator.java b/src/main/java/com/epam/reportportal/auth/integration/github/GitHubUserReplicator.java index 68edee81..32144ce4 100644 --- a/src/main/java/com/epam/reportportal/auth/integration/github/GitHubUserReplicator.java +++ b/src/main/java/com/epam/reportportal/auth/integration/github/GitHubUserReplicator.java @@ -45,6 +45,7 @@ import java.util.Date; import java.util.Objects; import java.util.Optional; +import java.util.UUID; import org.apache.commons.lang3.StringUtils; import org.springframework.core.io.Resource; import org.springframework.http.ResponseEntity; @@ -144,6 +145,7 @@ private void updateUser(User user, UserResource userResource, GitHubClient gitHu private User createUser(UserResource userResource, GitHubClient gitHubClient) { User user = new User(); String login = normalizeId(userResource.getLogin()); + user.setUuid(UUID.randomUUID()); user.setLogin(login); updateUser(user, userResource, gitHubClient); user.setUserType(UserType.GITHUB); diff --git a/src/main/java/com/epam/reportportal/auth/integration/ldap/LdapUserReplicator.java b/src/main/java/com/epam/reportportal/auth/integration/ldap/LdapUserReplicator.java index b285e2f2..ad0ed4f9 100644 --- a/src/main/java/com/epam/reportportal/auth/integration/ldap/LdapUserReplicator.java +++ b/src/main/java/com/epam/reportportal/auth/integration/ldap/LdapUserReplicator.java @@ -34,6 +34,7 @@ import com.epam.ta.reportportal.util.PersonalProjectService; import java.util.Map; import java.util.Optional; +import java.util.UUID; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ldap.core.DirContextOperations; @@ -103,6 +104,7 @@ private User createNewUser(DirContextOperations ctx, Map syncAtt String email, String login) { User newUser = new User(); newUser.setLogin(login); + newUser.setUuid(UUID.randomUUID()); String fullName = getFullName(ctx, syncAttributes); newUser.setFullName(fullName);