Skip to content

Commit 144b83e

Browse files
committed
Merge branch '6.2.x'
2 parents 707588f + 0aebc63 commit 144b83e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

docs/modules/ROOT/pages/servlet/authorization/method-security.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,6 @@ fun readAccountWithWrongRoleThenAccessDenied() {
395395

396396
While `@PreAuthorize` is quite helpful for declaring needed authorities, it can also be used to evaluate more complex <<using_method_parameters,expressions that involve the method parameters>>.
397397

398-
The above two snippets are ensuring that the user can only request orders that belong to them by comparing the username parameter to xref:servlet/authentication/architecture.adoc#servlet-authentication-authentication[`Authentication#getName`].
399-
400-
The result is that the above method will only be invoked if the `username` in the request path matches the logged-in user's `name`.
401-
If not, Spring Security will throw an `AccessDeniedException` and return a 403 status code.
402-
403398
[[use-postauthorize]]
404399
=== Authorization Method Results with `@PostAuthorize`
405400

0 commit comments

Comments
 (0)