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"