From 0590edf5c95ac24a5a91ae002525a804dd12acb2 Mon Sep 17 00:00:00 2001 From: Sumin Hwang <163857590+tnals0924@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:26:55 +0900 Subject: [PATCH 1/2] =?UTF-8?q?HOTFIX:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20=EA=B7=BC=EB=AC=B4?= =?UTF-8?q?=EC=9E=90=EB=8F=84=20=EB=93=A4=EC=96=B4=EA=B0=88=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useAuthRedirect.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hooks/useAuthRedirect.ts b/src/hooks/useAuthRedirect.ts index ae72099..a50a2f7 100644 --- a/src/hooks/useAuthRedirect.ts +++ b/src/hooks/useAuthRedirect.ts @@ -4,6 +4,8 @@ import { useEffect } from 'react'; import { useRouter, usePathname } from 'next/navigation'; import Cookies from 'js-cookie'; +const adminRole = ['ADMIN', 'GA', 'WORKER']; + const useAuthRedirect = () => { const router = useRouter(); const pathname = usePathname(); @@ -39,7 +41,10 @@ const useAuthRedirect = () => { return; } - if (currentPage.startsWith('/mobile/admin') && user.role !== 'ADMIN') { + if ( + currentPage.startsWith('/mobile/admin') && + adminRole.includes(user.role) + ) { alert('관리자만 이용 가능한 페이지입니다.'); router.replace('/mobile/main'); } From 2e4f7cd50a0acaf253265c1bd233dd10ec6829f8 Mon Sep 17 00:00:00 2001 From: Sumin Hwang <163857590+tnals0924@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:31:22 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=ED=8C=9D=EC=97=85=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/mobile/main/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/mobile/main/page.tsx b/src/app/mobile/main/page.tsx index 0d8c997..efce933 100644 --- a/src/app/mobile/main/page.tsx +++ b/src/app/mobile/main/page.tsx @@ -113,7 +113,7 @@ export default function MobileMain() { {showPopUp && ( setShowPopUp(false)} onClickOther={() => {