Merge branch '6.3.x'

This commit is contained in:
Josh Cummings 2024-10-23 15:24:32 -07:00
commit 8bac87fb20
2 changed files with 3 additions and 1 deletions

View File

@ -170,7 +170,8 @@ public final class AuthorizeHttpRequestsConfigurer<H extends HttpSecurityBuilder
+ ". Try completing it with something like requestUrls().<something>.hasRole('USER')"); + ". Try completing it with something like requestUrls().<something>.hasRole('USER')");
Assert.state(this.mappingCount > 0, Assert.state(this.mappingCount > 0,
"At least one mapping is required (for example, authorizeHttpRequests().anyRequest().authenticated())"); "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); return AuthorizeHttpRequestsConfigurer.this.postProcessor.postProcess(manager);
} }

View File

@ -172,6 +172,7 @@ public class AuthorizeHttpRequestsConfigurerTests {
ObjectPostProcessor<Object> objectPostProcessor = this.spring.getContext() ObjectPostProcessor<Object> objectPostProcessor = this.spring.getContext()
.getBean(ObjectPostProcessorConfig.class).objectPostProcessor; .getBean(ObjectPostProcessorConfig.class).objectPostProcessor;
verify(objectPostProcessor).postProcess(any(RequestMatcherDelegatingAuthorizationManager.class)); verify(objectPostProcessor).postProcess(any(RequestMatcherDelegatingAuthorizationManager.class));
verify(objectPostProcessor).postProcess(any(AuthorizationManager.class));
verify(objectPostProcessor).postProcess(any(AuthorizationFilter.class)); verify(objectPostProcessor).postProcess(any(AuthorizationFilter.class));
} }