Skip to content

Commit

Permalink
fix(database-permission): wrong to check DB permission when existing …
Browse files Browse the repository at this point in the history
…Invalid DB with the same name (#2641)
  • Loading branch information
smallsheeeep authored Jun 4, 2024
1 parent 9550c60 commit 6e9cf9c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ public List<UnauthorizedDatabase> filterUnauthorizedDatabases(
return Collections.emptyList();
}
ConnectionConfig dataSource = connectionService.getBasicWithoutPermissionCheck(dataSourceId);
List<Database> databases = listDatabasesByConnectionIds(Collections.singleton(dataSourceId));
List<Database> databases = listExistDatabasesByConnectionId(dataSourceId);
databases.forEach(d -> d.getDataSource().setName(dataSource.getName()));
Map<String, Database> name2Database = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
databases.forEach(d -> name2Database.put(d.getName(), d));
Expand Down

0 comments on commit 6e9cf9c

Please sign in to comment.