diff --git a/src/main/kotlin/roomescape/admin/infrastructure/persistence/AdminEntity.kt b/src/main/kotlin/roomescape/admin/infrastructure/persistence/AdminEntity.kt index 9f356427..85387596 100644 --- a/src/main/kotlin/roomescape/admin/infrastructure/persistence/AdminEntity.kt +++ b/src/main/kotlin/roomescape/admin/infrastructure/persistence/AdminEntity.kt @@ -30,7 +30,8 @@ class AdminEntity( enum class AdminType { HQ, - STORE + STORE, + ALL } enum class AdminPermissionLevel( diff --git a/src/main/kotlin/roomescape/auth/web/support/interceptors/AdminInterceptor.kt b/src/main/kotlin/roomescape/auth/web/support/interceptors/AdminInterceptor.kt index ed608e37..4b521df0 100644 --- a/src/main/kotlin/roomescape/auth/web/support/interceptors/AdminInterceptor.kt +++ b/src/main/kotlin/roomescape/auth/web/support/interceptors/AdminInterceptor.kt @@ -75,7 +75,7 @@ class AdminInterceptor( throw AuthException(AuthErrorCode.INVALID_TOKEN) } - if (type != AdminType.HQ && type != requiredType) { + if (requiredType != AdminType.ALL && type != requiredType) { log.warn { "[AdminInterceptor] 관리자 권한 부족: requiredType=${requiredType} / current=${type}" } throw AuthException(AuthErrorCode.ACCESS_DENIED) }