Skip to content

Commit

Permalink
BE: Fix cognito roles extractor regression (provectus#4171)
Browse files Browse the repository at this point in the history
Co-authored-by: Evgeny Petrushevsky <evgenuypetrushevskiv8@gmail.com>
  • Loading branch information
2 people authored and gimral committed Feb 23, 2024
1 parent eb0ac46 commit 3753df4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public Mono<Set<String>> extract(AccessControlService acs, Object value, Map<Str
.stream()
.filter(s -> s.getProvider().equals(Provider.OAUTH_COGNITO))
.filter(s -> s.getType().equals("group"))
.anyMatch(subject -> Stream.of(groups)
.map(Object::toString)
.anyMatch(subject -> groups
.stream()
.anyMatch(cognitoGroup -> cognitoGroup.equals(subject.getValue()))
))
.map(Role::getName)
Expand Down

0 comments on commit 3753df4

Please sign in to comment.