|
|
@@ -45,13 +45,11 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
|
|
|
}
|
|
|
});
|
|
|
return mono
|
|
|
- .filter(authentication -> authentication.isAuthenticated() || whiteListChecker.check(path))
|
|
|
+ .filter(Authentication::isAuthenticated)
|
|
|
.flatMapIterable(Authentication::getAuthorities)
|
|
|
.map(GrantedAuthority::getAuthority)
|
|
|
- .any(roleId -> {
|
|
|
- return CollectionUtils.isEmpty(authorities)?Boolean.TRUE:authorities.contains(roleId);
|
|
|
- })
|
|
|
- .map(AuthorizationDecision::new)
|
|
|
+ .any(roleId -> CollectionUtils.isEmpty(authorities) ? Boolean.TRUE:authorities.contains(roleId))
|
|
|
+ .map(granted -> new AuthorizationDecision(granted || whiteListChecker.check(path)))
|
|
|
.defaultIfEmpty(new AuthorizationDecision(false));
|
|
|
}
|
|
|
}
|