diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml index 18b1da0d..b3543cc4 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -29,6 +29,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up JDK 21 uses: actions/setup-java@v4 with: diff --git a/backend/src/main/kotlin/ch/sbb/backend/infrastructure/configuration/WebSecurityConfig.kt b/backend/src/main/kotlin/ch/sbb/backend/infrastructure/configuration/WebSecurityConfig.kt index 6e436ba4..aa0a5671 100644 --- a/backend/src/main/kotlin/ch/sbb/backend/infrastructure/configuration/WebSecurityConfig.kt +++ b/backend/src/main/kotlin/ch/sbb/backend/infrastructure/configuration/WebSecurityConfig.kt @@ -37,6 +37,7 @@ class WebSecurityConfig { authorize("/swagger-ui/**", permitAll) authorize("/v3/api-docs/**", permitAll) authorize("/actuator/health/**", permitAll) + authorize("/error", authenticated) authorize("/api/**", hasRole("admin")) authorize("/**", denyAll) }