fix security configuration
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -16,6 +16,16 @@ class TestController {
|
||||
return "Test page"
|
||||
}
|
||||
|
||||
@GetMapping("/debug")
|
||||
fun debug(): Map<String, Any> {
|
||||
val auth = SecurityContextHolder.getContext().authentication
|
||||
return mapOf(
|
||||
"isAuthenticated" to auth.isAuthenticated,
|
||||
"name" to auth.name,
|
||||
"authorities" to auth.authorities.map { it.authority }
|
||||
)
|
||||
}
|
||||
|
||||
@PreAuthorize("hasRole('USER')")
|
||||
@GetMapping("/users")
|
||||
fun users(): ArrayList<String> {
|
||||
|
||||
Reference in New Issue
Block a user