Skip to content

Commit

Permalink
CB-6015 try to find user with uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
yagudin10 committed Dec 5, 2024
1 parent 0b5af36 commit 3f33993
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,18 @@ public void importUsers(@NotNull SMUserImportList userImportList) throws DBExcep

protected void importUsers(@NotNull Connection connection, @NotNull SMUserImportList userImportList)
throws DBException, SQLException {

Check warning on line 189 in server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java

View workflow job for this annotation

GitHub Actions / Server / Lint

[checkstyle] reported by reviewdog 🐶 'throws' has incorrect indentation level 8, expected level should be 12. Raw Output: /github/workspace/./server/bundles/io.cloudbeaver.service.security/src/io/cloudbeaver/service/security/CBEmbeddedSecurityController.java:189:9: warning: 'throws' has incorrect indentation level 8, expected level should be 12. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
outer:
for (SMUserProvisioning user : userImportList.getUsers()) {
String authRole = user.getAuthRole() == null ? userImportList.getAuthRole() : user.getAuthRole();
if (isSubjectExists(user.getUserId())) {
log.info("User already exist : " + user.getUserId());
setUserAuthRole(connection, user.getUserId(), authRole);
enableUser(connection, user.getUserId(), true);
continue;
for (String possibleUserId : List.of(user.getUserId(), user.getUserId().toLowerCase())) {
if (isSubjectExists(possibleUserId)) {
log.info("User already exist : " + possibleUserId);
setUserAuthRole(connection, possibleUserId, authRole);
enableUser(connection, possibleUserId, true);
continue outer;
}
}
createUser(connection, user.getUserId(), user.getMetaParameters(), true, authRole);
createUser(connection, user.getUserId().toLowerCase(), user.getMetaParameters(), true, authRole);
}
}

Expand Down

0 comments on commit 3f33993

Please sign in to comment.