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 committed Oct 23, 2024
1 parent ec13b8d commit 2fdf6a8
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 @@ -170,7 +170,8 @@ private AuthorizationManager<HttpServletRequest> createAuthorizationManager() {
+ ". Try completing it with something like requestUrls().<something>.hasRole('USER')");
Assert.state(this.mappingCount > 0,
"At least one mapping is required (for example, authorizeHttpRequests().anyRequest().authenticated())");
RequestMatcherDelegatingAuthorizationManager manager = postProcess(this.managerBuilder.build());
AuthorizationManager<HttpServletRequest> manager = postProcess(
(AuthorizationManager<HttpServletRequest>) this.managerBuilder.build());
return AuthorizeHttpRequestsConfigurer.this.postProcessor.postProcess(manager);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public void configureWhenObjectPostProcessorRegisteredThenInvokedOnAuthorization
ObjectPostProcessor<Object> objectPostProcessor = this.spring.getContext()
.getBean(ObjectPostProcessorConfig.class).objectPostProcessor;
verify(objectPostProcessor).postProcess(any(RequestMatcherDelegatingAuthorizationManager.class));
verify(objectPostProcessor).postProcess(any(AuthorizationManager.class));
verify(objectPostProcessor).postProcess(any(AuthorizationFilter.class));
}

Expand Down

0 comments on commit 2fdf6a8

Please sign in to comment.