Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2025 DBeaver Corp and others
* Copyright (C) 2010-2026 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -404,15 +404,25 @@
}

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

Check warning on line 407 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:407:9: warning: 'throws' has incorrect indentation level 8, expected level should be 12. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
List<SMUserProvisioning> users = userImportList.getUsers();
Set<String> seen = new HashSet<>();
outer:
for (SMUserProvisioning user : userImportList.getUsers()) {
String authRole = user.getAuthRole() == null ? userImportList.getAuthRole() : user.getAuthRole();
String userId = user.getUserId();
for (SMUserProvisioning user : users) {
Map<String, String> metaParameters = user.getMetaParameters();
String effectiveUserId = user.getUserId();
if (CommonUtils.isNotEmpty(metaParameters.get(SMStandardMeta.META_USER_ID))) {
userId = metaParameters.get(SMStandardMeta.META_USER_ID);
effectiveUserId = metaParameters.get(SMStandardMeta.META_USER_ID);
}
String effectiveUserIdLowerCase = effectiveUserId.toLowerCase();
if (seen.contains(effectiveUserIdLowerCase)) {
log.warn("Skipping duplicate user (case-insensitive): " + effectiveUserId);
continue;
}
seen.add(effectiveUserIdLowerCase);

String authRole = user.getAuthRole() == null ? userImportList.getAuthRole() : user.getAuthRole();
String userId = effectiveUserId;
for (String possibleUserId : List.of(userId, userId.toLowerCase())) {
if (isSubjectExists(possibleUserId)) {
if (getSubjectType(possibleUserId) == SMSubjectType.team) {
Expand Down
Loading