mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-03 17:22:13 +00:00
Fix incorrect rendering of SpEL expression example tabs
This commit is contained in:
parent
5fdacef398
commit
e67b5f8356
@ -216,13 +216,15 @@ Java::
|
|||||||
----
|
----
|
||||||
@PreAuthorize("hasAuthority('permission:read') || hasRole('ADMIN')")
|
@PreAuthorize("hasAuthority('permission:read') || hasRole('ADMIN')")
|
||||||
----
|
----
|
||||||
======
|
|
||||||
|
|
||||||
.Kotlin
|
Kotlin::
|
||||||
[source,kotlin,role="kotlin"]
|
+
|
||||||
|
[source,kotlin,role="secondary"]
|
||||||
----
|
----
|
||||||
@PreAuthorize("hasAuthority('permission:read') || hasRole('ADMIN')")
|
@PreAuthorize("hasAuthority('permission:read') || hasRole('ADMIN')")
|
||||||
----
|
----
|
||||||
|
======
|
||||||
|
|
||||||
|
|
||||||
However, you could instead grant `permission:read` to those with `ROLE_ADMIN`.
|
However, you could instead grant `permission:read` to those with `ROLE_ADMIN`.
|
||||||
One way to do this is with a `RoleHierarchy` like so:
|
One way to do this is with a `RoleHierarchy` like so:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user