Skip to content

Commit 109f6e7

Browse files
committed
Add Note about RoleHierarchy
Closes gh-12766
1 parent bbd31f0 commit 109f6e7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/modules/ROOT/pages/servlet/authorization/architecture.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ AccessDecisionVoter hierarchyVoter() {
225225
----
226226
====
227227

228+
[NOTE]
229+
`RoleHierarchy` bean configuration is not yet ported over to `@EnableMethodSecurity`.
230+
As such this example is using `AccessDecisionVoter`.
231+
If you need `RoleHierarchy` support for method security, please continue using `@EnableGlobalMethodSecurity` until https://github.com/spring-projects/spring-security/issues/12783 is complete.
232+
228233
Here we have four roles in a hierarchy `ROLE_ADMIN => ROLE_STAFF => ROLE_USER => ROLE_GUEST`.
229234
A user who is authenticated with `ROLE_ADMIN`, will behave as if they have all four roles when security constraints are evaluated against an `AuthorizationManager` adapted to call the above `RoleHierarchyVoter`.
230235
The `>` symbol can be thought of as meaning "includes".

0 commit comments

Comments
 (0)