Skip to content

Commit

Permalink
Make RequestMatcherDelegatingAuthorizationManager Post-Processable
Browse files Browse the repository at this point in the history
Closes gh-15978
  • Loading branch information
codeconsole authored and jzheaux committed Oct 23, 2024
1 parent e9bbe31 commit bf6b163
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ private AuthorizationManager<HttpServletRequest> createAuthorizationManager() {
Assert.state(this.mappingCount > 0,
"At least one mapping is required (for example, authorizeHttpRequests().anyRequest().authenticated())");
ObservationRegistry registry = getObservationRegistry();
RequestMatcherDelegatingAuthorizationManager manager = postProcess(this.managerBuilder.build());
AuthorizationManager<HttpServletRequest> manager = postProcess(
(AuthorizationManager<HttpServletRequest>) this.managerBuilder.build());
if (registry.isNoop()) {
return manager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public void configureWhenObjectPostProcessorRegisteredThenInvokedOnAuthorization
this.spring.register(ObjectPostProcessorConfig.class).autowire();
ObjectPostProcessor objectPostProcessor = this.spring.getContext().getBean(ObjectPostProcessor.class);
verify(objectPostProcessor).postProcess(any(RequestMatcherDelegatingAuthorizationManager.class));
verify(objectPostProcessor).postProcess(any(AuthorizationManager.class));
verify(objectPostProcessor).postProcess(any(AuthorizationFilter.class));
}

Expand Down

0 comments on commit bf6b163

Please sign in to comment.