From 95cb31530da7e61337092f332c7d9205c93e367f Mon Sep 17 00:00:00 2001 From: Meehdi Date: Wed, 25 Dec 2024 18:33:14 +0100 Subject: [PATCH] Fix incorrect rendering of SpEL expression example tabs --- .../ROOT/pages/servlet/authorization/method-security.adoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc b/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc index 903fcb5ac1..6e72929dca 100644 --- a/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc +++ b/docs/modules/ROOT/pages/servlet/authorization/method-security.adoc @@ -216,13 +216,15 @@ Java:: ---- @PreAuthorize("hasAuthority('permission:read') || hasRole('ADMIN')") ---- -====== -.Kotlin -[source,kotlin,role="kotlin"] +Kotlin:: ++ +[source,kotlin,role="secondary"] ---- @PreAuthorize("hasAuthority('permission:read') || hasRole('ADMIN')") ---- +====== + However, you could instead grant `permission:read` to those with `ROLE_ADMIN`. One way to do this is with a `RoleHierarchy` like so: