From b16af2238fcc52062a4a457c58a037cc410d34a3 Mon Sep 17 00:00:00 2001 From: "dmitriy.churmeev" Date: Sun, 29 Mar 2026 13:07:03 +0300 Subject: [PATCH] fix security configuration --- src/main/kotlin/com/test/test/rest/TestController.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/com/test/test/rest/TestController.kt b/src/main/kotlin/com/test/test/rest/TestController.kt index f081bc6..17ea779 100644 --- a/src/main/kotlin/com/test/test/rest/TestController.kt +++ b/src/main/kotlin/com/test/test/rest/TestController.kt @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController @RestController class TestController { + @PreAuthorize("hasRole('ADMIN')") @GetMapping("/test") fun test(): String { return "Test page"