From a6d028de45b5d017854765cf865a21079dc2c8f3 Mon Sep 17 00:00:00 2001 From: pricelees Date: Tue, 16 Sep 2025 22:03:11 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=AA=A8=EB=93=A0=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9E=90=EC=97=90=20=ED=95=B4=EB=8B=B9=EB=90=98?= =?UTF-8?q?=EB=8A=94=20AdminType.ALL=20=ED=83=80=EC=9E=85=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roomescape/admin/infrastructure/persistence/AdminEntity.kt | 3 ++- .../auth/web/support/interceptors/AdminInterceptor.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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) }