Skip to content

Commit 6803412

Browse files
committed
Fix extensibility issue since RequestMatcherDelegatingAuthorizationManager is final and does not expose any public methods other than what is available through AuthorizationManager. Fixes #15948
1 parent 8a97291 commit 6803412

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configurers/AuthorizeHttpRequestsConfigurer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ private AuthorizationManager<HttpServletRequest> createAuthorizationManager() {
170170
+ ". Try completing it with something like requestUrls().<something>.hasRole('USER')");
171171
Assert.state(this.mappingCount > 0,
172172
"At least one mapping is required (for example, authorizeHttpRequests().anyRequest().authenticated())");
173-
RequestMatcherDelegatingAuthorizationManager manager = postProcess(this.managerBuilder.build());
173+
AuthorizationManager<HttpServletRequest> manager = postProcess(
174+
(AuthorizationManager<HttpServletRequest>) this.managerBuilder.build());
174175
return AuthorizeHttpRequestsConfigurer.this.postProcessor.postProcess(manager);
175176
}
176177

0 commit comments

Comments
 (0)