Fix incorrect rendering of SpEL expression example tabs

This commit is contained in:
Meehdi 2024-12-25 18:33:14 +01:00 committed by Rob Winch
parent 5fdacef398
commit e67b5f8356

View File

@ -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: