Skip to content

Commit fd1db06

Browse files
boulcemarcusdacoregio
authored andcommitted
Typo: Update authorize-http-requests.adoc
'patters' -> 'pattern' ----- 'db' -> "db", 'ADMIN' -> "ADMIN" They should be string type ----- There is no semicolon. I added it. ----- There is no semicolon at the end of the sentence. So I added
1 parent 7f58a27 commit fd1db06

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void endpointWhenNotUserAuthorityThenForbidden() {
258258
@Test
259259
void anyWhenUnauthenticatedThenUnauthorized() {
260260
this.mvc.perform(get("/any"))
261-
.andExpect(status().isUnauthorized())
261+
.andExpect(status().isUnauthorized());
262262
}
263263
----
264264
======
@@ -387,7 +387,7 @@ void endpointWhenNotUserAuthorityThenForbidden() {
387387
@Test
388388
void anyWhenUnauthenticatedThenUnauthorized() {
389389
this.mvc.perform(get("/any"))
390-
.andExpect(status().isUnauthorized())
390+
.andExpect(status().isUnauthorized());
391391
}
392392
----
393393
======
@@ -521,7 +521,7 @@ void getWhenNoReadAuthorityThenForbidden() {
521521
@Test
522522
void postWhenWriteAuthorityThenAuthorized() {
523523
this.mvc.perform(post("/any").with(csrf()))
524-
.andExpect(status().isOk())
524+
.andExpect(status().isOk());
525525
}
526526
527527
@WithMockUser(authorities="read")
@@ -737,7 +737,7 @@ SecurityFilterChain web(HttpSecurity http) throws Exception {
737737
.dispatcherTypeMatchers(FORWARD, ERROR).permitAll() // <2>
738738
.requestMatchers("/static/**", "/signup", "/about").permitAll() // <3>
739739
.requestMatchers("/admin/**").hasRole("ADMIN") // <4>
740-
.requestMatchers("/db/**").access(allOf(hasAuthority('db'), hasRole('ADMIN'))) // <5>
740+
.requestMatchers("/db/**").access(allOf(hasAuthority("db"), hasRole("ADMIN"))) // <5>
741741
.anyRequest().denyAll() // <6>
742742
);
743743
@@ -805,7 +805,7 @@ Xml::
805805
</http>
806806
----
807807
======
808-
<1> We specified a URL patters that any user can access.
808+
<1> We specified a URL pattern that any user can access.
809809
Specifically, any user can access a request if the URL starts with "/static/".
810810
<2> Any URL that starts with "/admin/" will be restricted to users who have the role "ROLE_ADMIN".
811811
You will notice that since we are invoking the `hasRole` method we do not need to specify the "ROLE_" prefix.

0 commit comments

Comments
 (0)