Fix setServletContext not being called for AuthorizationManagerWebInvocationPrivilegeEvaluator
Issue gh-10908
This commit is contained in:
parent
97acbcc2d0
commit
23594b3d01
|
@ -357,7 +357,10 @@ public final class WebSecurity extends AbstractConfiguredSecurityBuilder<Filter,
|
||||||
if (filter instanceof AuthorizationFilter) {
|
if (filter instanceof AuthorizationFilter) {
|
||||||
AuthorizationManager<HttpServletRequest> authorizationManager = ((AuthorizationFilter) filter)
|
AuthorizationManager<HttpServletRequest> authorizationManager = ((AuthorizationFilter) filter)
|
||||||
.getAuthorizationManager();
|
.getAuthorizationManager();
|
||||||
privilegeEvaluators.add(new AuthorizationManagerWebInvocationPrivilegeEvaluator(authorizationManager));
|
AuthorizationManagerWebInvocationPrivilegeEvaluator evaluator = new AuthorizationManagerWebInvocationPrivilegeEvaluator(
|
||||||
|
authorizationManager);
|
||||||
|
evaluator.setServletContext(this.servletContext);
|
||||||
|
privilegeEvaluators.add(evaluator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new RequestMatcherEntry<>(securityFilterChain::matches, privilegeEvaluators);
|
return new RequestMatcherEntry<>(securityFilterChain::matches, privilegeEvaluators);
|
||||||
|
|
Loading…
Reference in New Issue