Skip to content

Commit 5b08e71

Browse files
committed
#1397: Selecting current activeAuthId when "inherit from login" is selected for authentication type of datasource
1 parent 6a3d7d3 commit 5b08e71

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/query/ApplicationQueryApiServiceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,15 @@ protected Mono<List<Property>> getAuthParamsAndHeadersInheritFromLogin(User user
196196
if(authId == null) {
197197
return Mono.empty();
198198
}
199+
200+
String filterAuthId;
201+
if(StringUtils.isEmpty(authId)) filterAuthId = user.getActiveAuthId();
202+
else {
203+
filterAuthId = authId;
204+
}
199205
Optional<Connection> activeConnectionOptional = user.getConnections()
200206
.stream()
201-
.filter(connection -> connection.getAuthId().equals(authId))
207+
.filter(connection -> connection.getAuthId().equals(filterAuthId))
202208
.findFirst();
203209
if(!activeConnectionOptional.isPresent() || activeConnectionOptional.get().getAuthConnectionAuthToken() == null) {
204210
return Mono.empty();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy