1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Correct access(String) reference

Closes gh-11280
This commit is contained in:
Josh Cummings
2022-05-27 14:51:45 -06:00
parent f4c0fcb5ef
commit ff0d85e2ac
@@ -69,7 +69,7 @@ SecurityFilterChain web(HttpSecurity http) throws Exception {
.authorizeHttpRequests(authorize -> authorize // <1>
.mvcMatchers("/resources/**", "/signup", "/about").permitAll() // <2>
.mvcMatchers("/admin/**").hasRole("ADMIN") // <3>
.mvcMatchers("/db/**").access("hasRole('ADMIN') and hasRole('DBA')") // <4>
.mvcMatchers("/db/**").access(new WebExpressionAuthorizationManager("hasRole('ADMIN') and hasRole('DBA')")) // <4>
.anyRequest().denyAll() // <5>
);