Make @PreFilter & @PostFilter suitable for reactive methods #5249
Labels
in: core
An issue in spring-security-core
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
Summary
Hey,
The current implementation of the Pre- & PostFilter can not be used for the return type of Flux.
By trying to Filter the objects of X, the DefaultMethodSecurityExpressionHandler.class only checks, if the returned object X is an instance of Collection or an Array. But since the PrePostAdviceReactiveMethodInterceptor.class (line 103) already maps the single entries of the Flux to the postAdvice filter, this check fails if not something like Flux<List> is returned from the Controller.
Actual Behavior
Expected Behavior
A filtered Flux, that removed the objects that do not match the filter.
Example
Version
spring-boot-starter-parent: 2.0.1.RELEASE
spring-boot-starter-webflux: 2.0.1.RELEASE
spring-security-config: 5.0.4.RELEASE
spring-security-core: 5.0.4.RELEASE
The text was updated successfully, but these errors were encountered: