Content-Length: 271647 | pFad | http://github.com/lowcoder-org/lowcoder/commit/5b08e710cc7d77cf21de9700a4a87abb039c01ec

D1 #1397: Selecting current activeAuthId when "inherit from login" is se… · lowcoder-org/lowcoder@5b08e71 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/lowcoder-org/lowcoder/commit/5b08e710cc7d77cf21de9700a4a87abb039c01ec

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy