From b2dae93ac16a9c447a7ddaee8b18f689dd374caa Mon Sep 17 00:00:00 2001 From: kyy Date: Tue, 3 Mar 2026 14:10:44 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=90=EC=82=AC=20=EB=A1=9C=EA=B7=B8=20403?= =?UTF-8?q?=20=EC=8B=9C=20=EA=B6=8C=ED=95=9C=20=EC=95=88=EB=82=B4=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=EB=A1=9C=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devfront/src/features/audit/AuditLogsPage.tsx | 16 +++++++++++++--- devfront/src/locales/en.toml | 1 + devfront/src/locales/ko.toml | 1 + devfront/src/locales/template.toml | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/devfront/src/features/audit/AuditLogsPage.tsx b/devfront/src/features/audit/AuditLogsPage.tsx index d3a33d06..5e0b64e7 100644 --- a/devfront/src/features/audit/AuditLogsPage.tsx +++ b/devfront/src/features/audit/AuditLogsPage.tsx @@ -168,9 +168,19 @@ function AuditLogsPage() { } if (query.error) { - const errMsg = - (query.error as AxiosError<{ error?: string }>).response?.data?.error ?? - (query.error as Error).message; + const axiosError = query.error as AxiosError<{ error?: string }>; + if (axiosError.response?.status === 403) { + return ( +
+ {t( + "msg.dev.audit.forbidden", + "감사 로그를 조회할 권한이 없습니다. 관리자에게 권한을 요청해주세요.", + )} +
+ ); + } + + const errMsg = axiosError.response?.data?.error ?? (query.error as Error).message; return (
{t("msg.dev.audit.load_error", "Error loading logs: {{error}}", { diff --git a/devfront/src/locales/en.toml b/devfront/src/locales/en.toml index 6483649c..873db7ad 100644 --- a/devfront/src/locales/en.toml +++ b/devfront/src/locales/en.toml @@ -209,6 +209,7 @@ logout_confirm = "Are you sure you want to log out?" [msg.dev.audit] empty = "No audit logs found." +forbidden = "You do not have permission to view audit logs. Please request access from an administrator." load_error = "Error loading audit logs: {{error}}" loaded_count = "Loaded {{count}} rows" loading = "Loading audit logs..." diff --git a/devfront/src/locales/ko.toml b/devfront/src/locales/ko.toml index 549637bf..5cf66d94 100644 --- a/devfront/src/locales/ko.toml +++ b/devfront/src/locales/ko.toml @@ -209,6 +209,7 @@ logout_confirm = "로그아웃 하시겠습니까?" [msg.dev.audit] empty = "조회된 감사 로그가 없습니다." +forbidden = "감사 로그를 조회할 권한이 없습니다. 관리자에게 권한을 요청해주세요." load_error = "감사 로그 조회 실패: {{error}}" loaded_count = "로드된 로그 {{count}}건" loading = "감사 로그를 불러오는 중..." diff --git a/devfront/src/locales/template.toml b/devfront/src/locales/template.toml index 163445e1..de2540ee 100644 --- a/devfront/src/locales/template.toml +++ b/devfront/src/locales/template.toml @@ -209,6 +209,7 @@ logout_confirm = "" [msg.dev.audit] empty = "" +forbidden = "" load_error = "" loaded_count = "" loading = ""