| undefined,
+ );
+
+ // Use profile.role from API if available, otherwise fallback to local role
+ const displayRoleKey = profile?.role || currentRole;
+
+ const isDevConsoleAllowed = [
+ "super_admin",
+ "tenant_admin",
+ "rp_admin",
+ ].includes(currentRole);
const expiresAtSec = auth.user?.expires_at;
const remainingMs =
typeof expiresAtSec === "number" ? expiresAtSec * 1000 - nowMs : null;
@@ -191,23 +215,24 @@ function AppLayout() {
- {navItems.map(({ labelKey, labelFallback, to, icon: Icon }) => (
-
- [
- "flex items-center gap-3 rounded-xl px-3 py-3 text-sm transition",
- isActive
- ? "bg-primary/10 text-primary shadow-[0_12px_40px_rgba(54,211,153,0.18)]"
- : "text-muted-foreground hover:bg-muted/10 hover:text-foreground",
- ].join(" ")
- }
- >
-
- {t(labelKey, labelFallback)}
-
- ))}
+ {isDevConsoleAllowed &&
+ navItems.map(({ labelKey, labelFallback, to, icon: Icon }) => (
+
+ [
+ "flex items-center gap-3 rounded-xl px-3 py-3 text-sm transition",
+ isActive
+ ? "bg-primary/10 text-primary shadow-[0_12px_40px_rgba(54,211,153,0.18)]"
+ : "text-muted-foreground hover:bg-muted/10 hover:text-foreground",
+ ].join(" ")
+ }
+ >
+
+ {t(labelKey, labelFallback)}
+
+ ))}
@@ -296,14 +321,41 @@ function AppLayout() {
{t("ui.dev.profile.menu_title", "Account")}
-
-
- {profileName}
-
-
- {profileEmail}
-
+
+
+
+ {profileName}
+
+
+ {profileEmail}
+
+
+
+
+ {t(
+ `ui.common.role.${displayRoleKey}`,
+ displayRoleKey.toUpperCase(),
+ )}
+
+
+
+
+
;
}
+ const normalizedRole = resolveProfileRole(
+ auth.user?.profile as Record
| undefined,
+ );
+ const isTenantMember =
+ normalizedRole === "user" || normalizedRole === "tenant_member";
+
+ if (isTenantMember) {
+ return (
+
+
+
+ {t("msg.dev.auth.access_denied_title", "접근 권한이 없습니다.")}
+
+
+ {t(
+ "msg.dev.auth.access_denied_description",
+ "DevFront는 관리자 전용 화면입니다. 권한이 필요하면 관리자에게 요청해 주세요.",
+ )}
+
+
+
+
+ );
+ }
+
return ;
}
diff --git a/devfront/src/features/clients/ClientConsentsPage.tsx b/devfront/src/features/clients/ClientConsentsPage.tsx
index 56cb764b..75c85219 100644
--- a/devfront/src/features/clients/ClientConsentsPage.tsx
+++ b/devfront/src/features/clients/ClientConsentsPage.tsx
@@ -356,7 +356,7 @@ function ClientConsentsPage() {