Browse Source

Correct access(String) reference

Closes gh-11280
pull/11300/head
Josh Cummings 4 years ago
parent
commit
ff0d85e2ac
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
  1. 2
      docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc

2
docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc

@ -69,7 +69,7 @@ SecurityFilterChain web(HttpSecurity http) throws Exception {
.authorizeHttpRequests(authorize -> authorize // <1> .authorizeHttpRequests(authorize -> authorize // <1>
.mvcMatchers("/resources/**", "/signup", "/about").permitAll() // <2> .mvcMatchers("/resources/**", "/signup", "/about").permitAll() // <2>
.mvcMatchers("/admin/**").hasRole("ADMIN") // <3> .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> .anyRequest().denyAll() // <5>
); );

Loading…
Cancel
Save