forked from baron/baron-sso
local 브런치 code-check 오류 수정
This commit is contained in:
@@ -46,10 +46,9 @@ function AppLayout() {
|
|||||||
const isMockRoleEnabled =
|
const isMockRoleEnabled =
|
||||||
isDevRoleOverrideEnabled &&
|
isDevRoleOverrideEnabled &&
|
||||||
window.localStorage.getItem("X-Mock-Role-Enabled") === "true";
|
window.localStorage.getItem("X-Mock-Role-Enabled") === "true";
|
||||||
const mockRoleOverride =
|
const mockRoleOverride = isMockRoleEnabled
|
||||||
isMockRoleEnabled
|
? window.localStorage.getItem("X-Mock-Role")
|
||||||
? window.localStorage.getItem("X-Mock-Role")
|
: null;
|
||||||
: null;
|
|
||||||
const [theme, setTheme] = useState<"light" | "dark">(() => {
|
const [theme, setTheme] = useState<"light" | "dark">(() => {
|
||||||
const stored = window.localStorage.getItem("admin_theme");
|
const stored = window.localStorage.getItem("admin_theme");
|
||||||
return stored === "dark" ? "dark" : "light";
|
return stored === "dark" ? "dark" : "light";
|
||||||
@@ -337,10 +336,7 @@ function AppLayout() {
|
|||||||
const handleSessionExpiryToggle = () => {
|
const handleSessionExpiryToggle = () => {
|
||||||
setIsSessionExpiryEnabled((prev) => {
|
setIsSessionExpiryEnabled((prev) => {
|
||||||
const next = !prev;
|
const next = !prev;
|
||||||
window.localStorage.setItem(
|
window.localStorage.setItem("baron_session_expiry_enabled", String(next));
|
||||||
"baron_session_expiry_enabled",
|
|
||||||
String(next),
|
|
||||||
);
|
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -413,10 +409,7 @@ function AppLayout() {
|
|||||||
{t("ui.admin.header.plane", "ADMIN PLANE")}
|
{t("ui.admin.header.plane", "ADMIN PLANE")}
|
||||||
</p>
|
</p>
|
||||||
<span className="text-lg font-semibold">
|
<span className="text-lg font-semibold">
|
||||||
{t(
|
{t("ui.admin.header.subtitle", "Manage your organization")}
|
||||||
"ui.admin.header.subtitle",
|
|
||||||
"Manage your organization",
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -518,9 +511,7 @@ function AppLayout() {
|
|||||||
onClick={handleSessionExpiryToggle}
|
onClick={handleSessionExpiryToggle}
|
||||||
className={[
|
className={[
|
||||||
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
|
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
|
||||||
isSessionExpiryEnabled
|
isSessionExpiryEnabled ? "bg-primary" : "bg-muted",
|
||||||
? "bg-primary"
|
|
||||||
: "bg-muted",
|
|
||||||
].join(" ")}
|
].join(" ")}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -580,7 +571,9 @@ function AppLayout() {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setIsProfileOpen(false);
|
setIsProfileOpen(false);
|
||||||
navigate(`/users/${profile?.id || auth.user?.profile.sub}`);
|
navigate(
|
||||||
|
`/users/${profile?.id || auth.user?.profile.sub}`,
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
className="mt-2 flex w-full items-center gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm text-foreground transition hover:bg-muted/20"
|
className="mt-2 flex w-full items-center gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm text-foreground transition hover:bg-muted/20"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -130,8 +130,12 @@ const RoleSwitcher: FC = () => {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span>{t("ui.admin.dev_role_switcher_real", "실제 역할 사용")}</span>
|
<span>
|
||||||
{!isOverrideEnabled && <span style={{ marginLeft: "8px" }}>✅</span>}
|
{t("ui.admin.dev_role_switcher_real", "실제 역할 사용")}
|
||||||
|
</span>
|
||||||
|
{!isOverrideEnabled && (
|
||||||
|
<span style={{ marginLeft: "8px" }}>✅</span>
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
{(["super_admin", "tenant_admin", "rp_admin", "user"] as const).map(
|
{(["super_admin", "tenant_admin", "rp_admin", "user"] as const).map(
|
||||||
(role) => (
|
(role) => (
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
|
|||||||
it("returns false when remaining time is above the 5 minute threshold", () => {
|
it("returns false when remaining time is above the 5 minute threshold", () => {
|
||||||
expect(
|
expect(
|
||||||
shouldAttemptSlidingSessionRenew({
|
shouldAttemptSlidingSessionRenew({
|
||||||
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS + 1_000) / 1000),
|
expiresAtSec: Math.floor(
|
||||||
|
(nowMs + SESSION_RENEW_THRESHOLD_MS + 1_000) / 1000,
|
||||||
|
),
|
||||||
nowMs,
|
nowMs,
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
isAuthenticated: true,
|
isAuthenticated: true,
|
||||||
@@ -24,7 +26,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
|
|||||||
it("returns true when remaining time is within the 5 minute threshold", () => {
|
it("returns true when remaining time is within the 5 minute threshold", () => {
|
||||||
expect(
|
expect(
|
||||||
shouldAttemptSlidingSessionRenew({
|
shouldAttemptSlidingSessionRenew({
|
||||||
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
|
expiresAtSec: Math.floor(
|
||||||
|
(nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
|
||||||
|
),
|
||||||
nowMs,
|
nowMs,
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
isAuthenticated: true,
|
isAuthenticated: true,
|
||||||
@@ -38,7 +42,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
|
|||||||
it("returns false when automatic renewal is disabled", () => {
|
it("returns false when automatic renewal is disabled", () => {
|
||||||
expect(
|
expect(
|
||||||
shouldAttemptSlidingSessionRenew({
|
shouldAttemptSlidingSessionRenew({
|
||||||
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
|
expiresAtSec: Math.floor(
|
||||||
|
(nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
|
||||||
|
),
|
||||||
nowMs,
|
nowMs,
|
||||||
isEnabled: false,
|
isEnabled: false,
|
||||||
isAuthenticated: true,
|
isAuthenticated: true,
|
||||||
@@ -52,7 +58,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
|
|||||||
it("returns false when the last renew attempt is still within the throttle window", () => {
|
it("returns false when the last renew attempt is still within the throttle window", () => {
|
||||||
expect(
|
expect(
|
||||||
shouldAttemptSlidingSessionRenew({
|
shouldAttemptSlidingSessionRenew({
|
||||||
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
|
expiresAtSec: Math.floor(
|
||||||
|
(nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
|
||||||
|
),
|
||||||
nowMs,
|
nowMs,
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
isAuthenticated: true,
|
isAuthenticated: true,
|
||||||
|
|||||||
@@ -702,6 +702,7 @@ title = ""
|
|||||||
[ui.admin]
|
[ui.admin]
|
||||||
brand = ""
|
brand = ""
|
||||||
dev_role_switcher = ""
|
dev_role_switcher = ""
|
||||||
|
dev_role_switcher_real = ""
|
||||||
title = ""
|
title = ""
|
||||||
|
|
||||||
[ui.admin.api_keys]
|
[ui.admin.api_keys]
|
||||||
@@ -1429,6 +1430,7 @@ type = ""
|
|||||||
[ui.dev.clients.type]
|
[ui.dev.clients.type]
|
||||||
pkce = ""
|
pkce = ""
|
||||||
private = ""
|
private = ""
|
||||||
|
pkce_headless = ""
|
||||||
|
|
||||||
[ui.dev.dashboard]
|
[ui.dev.dashboard]
|
||||||
ready_badge = ""
|
ready_badge = ""
|
||||||
|
|||||||
@@ -276,10 +276,7 @@ function AppLayout() {
|
|||||||
const handleSessionExpiryToggle = () => {
|
const handleSessionExpiryToggle = () => {
|
||||||
setIsSessionExpiryEnabled((prev) => {
|
setIsSessionExpiryEnabled((prev) => {
|
||||||
const next = !prev;
|
const next = !prev;
|
||||||
window.localStorage.setItem(
|
window.localStorage.setItem("baron_session_expiry_enabled", String(next));
|
||||||
"baron_session_expiry_enabled",
|
|
||||||
String(next),
|
|
||||||
);
|
|
||||||
return next;
|
return next;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -467,9 +464,7 @@ function AppLayout() {
|
|||||||
onClick={handleSessionExpiryToggle}
|
onClick={handleSessionExpiryToggle}
|
||||||
className={[
|
className={[
|
||||||
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
|
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
|
||||||
isSessionExpiryEnabled
|
isSessionExpiryEnabled ? "bg-primary" : "bg-muted",
|
||||||
? "bg-primary"
|
|
||||||
: "bg-muted",
|
|
||||||
].join(" ")}
|
].join(" ")}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export type ClientSummary = {
|
|||||||
jwks?: string | Record<string, unknown>;
|
jwks?: string | Record<string, unknown>;
|
||||||
redirectUris: string[];
|
redirectUris: string[];
|
||||||
scopes: string[];
|
scopes: string[];
|
||||||
metadata?: Record<string, any>;
|
metadata?: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ClientListResponse = {
|
export type ClientListResponse = {
|
||||||
|
|||||||
@@ -846,6 +846,7 @@ name = ""
|
|||||||
|
|
||||||
[ui.admin.header]
|
[ui.admin.header]
|
||||||
plane = ""
|
plane = ""
|
||||||
|
subtitle = ""
|
||||||
|
|
||||||
[ui.admin.nav]
|
[ui.admin.nav]
|
||||||
api_keys = ""
|
api_keys = ""
|
||||||
|
|||||||
@@ -776,6 +776,7 @@ title = "Sign-up complete"
|
|||||||
[ui.admin]
|
[ui.admin]
|
||||||
brand = "Brand"
|
brand = "Brand"
|
||||||
dev_role_switcher = "🛠 DEV Role Switcher"
|
dev_role_switcher = "🛠 DEV Role Switcher"
|
||||||
|
dev_role_switcher_real = "Use real role"
|
||||||
title = "Admin Control"
|
title = "Admin Control"
|
||||||
|
|
||||||
[ui.admin.api_keys]
|
[ui.admin.api_keys]
|
||||||
@@ -899,6 +900,7 @@ name = "NAME"
|
|||||||
|
|
||||||
[ui.admin.header]
|
[ui.admin.header]
|
||||||
plane = "Admin Plane"
|
plane = "Admin Plane"
|
||||||
|
subtitle = "Manage tenants, policies, and operators"
|
||||||
|
|
||||||
[ui.admin.nav]
|
[ui.admin.nav]
|
||||||
api_keys = "API Keys"
|
api_keys = "API Keys"
|
||||||
@@ -1560,6 +1562,7 @@ type = "Type"
|
|||||||
[ui.dev.clients.type]
|
[ui.dev.clients.type]
|
||||||
pkce = "PKCE"
|
pkce = "PKCE"
|
||||||
private = "Server side App"
|
private = "Server side App"
|
||||||
|
pkce_headless = "Headless PKCE"
|
||||||
|
|
||||||
[ui.dev.dashboard]
|
[ui.dev.dashboard]
|
||||||
ready_badge = "devfront ready"
|
ready_badge = "devfront ready"
|
||||||
@@ -1596,7 +1599,9 @@ plane = "Dev Plane"
|
|||||||
subtitle = "Manage your applications"
|
subtitle = "Manage your applications"
|
||||||
|
|
||||||
[ui.dev.session]
|
[ui.dev.session]
|
||||||
|
auto_extend = "Session expiry controls"
|
||||||
active = "Checking expiration..."
|
active = "Checking expiration..."
|
||||||
|
disabled = "Auto extend disabled"
|
||||||
unknown = "Unknown"
|
unknown = "Unknown"
|
||||||
expired = "Session expired"
|
expired = "Session expired"
|
||||||
expiring = "Expiring soon: {{minutes}}m {{seconds}}s left"
|
expiring = "Expiring soon: {{minutes}}m {{seconds}}s left"
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ greeting = "안녕하세요, {{name}}님"
|
|||||||
[ui.admin]
|
[ui.admin]
|
||||||
brand = "Baron 로그인"
|
brand = "Baron 로그인"
|
||||||
dev_role_switcher = "🛠 DEV Role Switcher"
|
dev_role_switcher = "🛠 DEV Role Switcher"
|
||||||
|
dev_role_switcher_real = "실제 역할 사용"
|
||||||
title = "Admin Control"
|
title = "Admin Control"
|
||||||
|
|
||||||
[ui.common]
|
[ui.common]
|
||||||
@@ -375,6 +376,7 @@ import_csv = "CSV 임포트"
|
|||||||
|
|
||||||
[ui.admin.header]
|
[ui.admin.header]
|
||||||
plane = "Admin Plane"
|
plane = "Admin Plane"
|
||||||
|
subtitle = "관리 및 정책 운영"
|
||||||
|
|
||||||
[ui.admin.nav]
|
[ui.admin.nav]
|
||||||
api_keys = "API 키"
|
api_keys = "API 키"
|
||||||
@@ -463,7 +465,9 @@ plane = "Dev Plane"
|
|||||||
subtitle = "Manage your applications"
|
subtitle = "Manage your applications"
|
||||||
|
|
||||||
[ui.dev.session]
|
[ui.dev.session]
|
||||||
|
auto_extend = "세션 만료 관리"
|
||||||
active = "세션 활성"
|
active = "세션 활성"
|
||||||
|
disabled = "자동 연장 비활성화"
|
||||||
unknown = "알 수 없음"
|
unknown = "알 수 없음"
|
||||||
expired = "세션 만료"
|
expired = "세션 만료"
|
||||||
expiring = "만료 임박: {{minutes}}분 {{seconds}}초 남음"
|
expiring = "만료 임박: {{minutes}}분 {{seconds}}초 남음"
|
||||||
@@ -1277,6 +1281,7 @@ type = "유형"
|
|||||||
[ui.dev.clients.type]
|
[ui.dev.clients.type]
|
||||||
private = "Server side App"
|
private = "Server side App"
|
||||||
pkce = "PKCE"
|
pkce = "PKCE"
|
||||||
|
pkce_headless = "Headless PKCE"
|
||||||
|
|
||||||
[ui.dev.dashboard.badge]
|
[ui.dev.dashboard.badge]
|
||||||
consent_guard = "Consent guard ready"
|
consent_guard = "Consent guard ready"
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ greeting = ""
|
|||||||
[ui.admin]
|
[ui.admin]
|
||||||
brand = ""
|
brand = ""
|
||||||
dev_role_switcher = ""
|
dev_role_switcher = ""
|
||||||
|
dev_role_switcher_real = ""
|
||||||
title = ""
|
title = ""
|
||||||
|
|
||||||
[ui.common]
|
[ui.common]
|
||||||
@@ -375,6 +376,7 @@ import_csv = ""
|
|||||||
|
|
||||||
[ui.admin.header]
|
[ui.admin.header]
|
||||||
plane = ""
|
plane = ""
|
||||||
|
subtitle = ""
|
||||||
|
|
||||||
[ui.admin.nav]
|
[ui.admin.nav]
|
||||||
api_keys = ""
|
api_keys = ""
|
||||||
@@ -463,7 +465,9 @@ plane = ""
|
|||||||
subtitle = ""
|
subtitle = ""
|
||||||
|
|
||||||
[ui.dev.session]
|
[ui.dev.session]
|
||||||
|
auto_extend = ""
|
||||||
active = ""
|
active = ""
|
||||||
|
disabled = ""
|
||||||
unknown = ""
|
unknown = ""
|
||||||
expired = ""
|
expired = ""
|
||||||
expiring = ""
|
expiring = ""
|
||||||
@@ -1277,6 +1281,7 @@ type = ""
|
|||||||
[ui.dev.clients.type]
|
[ui.dev.clients.type]
|
||||||
pkce = ""
|
pkce = ""
|
||||||
private = ""
|
private = ""
|
||||||
|
pkce_headless = ""
|
||||||
|
|
||||||
[ui.dev.dashboard.badge]
|
[ui.dev.dashboard.badge]
|
||||||
consent_guard = ""
|
consent_guard = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user