From 128ac94575673b2a6c7e8bcc796d00aa2440f3b7 Mon Sep 17 00:00:00 2001 From: kyy Date: Mon, 4 May 2026 13:17:40 +0900 Subject: [PATCH] =?UTF-8?q?code=20check=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenants/routes/TenantListPage.tsx | 5 +--- .../tests/tenant_seed_protection.spec.ts | 4 +-- adminfront/tests/tenants.spec.ts | 4 +-- backend/internal/domain/hydra_models.go | 4 +-- backend/internal/handler/auth_handler.go | 30 +++++++++---------- .../tenant_handler_seed_delete_test.go | 2 +- .../features/clients/ClientGeneralPage.tsx | 20 ++++++------- locales/en.toml | 2 ++ locales/ko.toml | 2 ++ locales/template.toml | 2 ++ 10 files changed, 38 insertions(+), 37 deletions(-) diff --git a/adminfront/src/features/tenants/routes/TenantListPage.tsx b/adminfront/src/features/tenants/routes/TenantListPage.tsx index 4a724071..e86c2db8 100644 --- a/adminfront/src/features/tenants/routes/TenantListPage.tsx +++ b/adminfront/src/features/tenants/routes/TenantListPage.tsx @@ -570,10 +570,7 @@ function TenantListPage() { {tenant.name} {isSeedTenant(tenant) && ( - {t( - "ui.admin.tenants.seed_badge", - "초기 설정", - )} + {t("ui.admin.tenants.seed_badge", "초기 설정")} )} diff --git a/adminfront/tests/tenant_seed_protection.spec.ts b/adminfront/tests/tenant_seed_protection.spec.ts index f47f2af2..a78deab6 100644 --- a/adminfront/tests/tenant_seed_protection.spec.ts +++ b/adminfront/tests/tenant_seed_protection.spec.ts @@ -103,9 +103,7 @@ test.describe("Seed tenant protection", () => { const normalRow = page.getByRole("row", { name: /일반 테넌트/ }); await expect(normalRow.getByRole("checkbox")).toBeEnabled(); - await expect( - normalRow.getByRole("button", { name: /삭제/ }), - ).toBeEnabled(); + await expect(normalRow.getByRole("button", { name: /삭제/ })).toBeEnabled(); }); test("disables delete action on seed tenant profile", async ({ page }) => { diff --git a/adminfront/tests/tenants.spec.ts b/adminfront/tests/tenants.spec.ts index 2bff1771..1847ce68 100644 --- a/adminfront/tests/tenants.spec.ts +++ b/adminfront/tests/tenants.spec.ts @@ -217,8 +217,8 @@ test.describe("Tenants Management", () => { expect(importBody).toContain('filename="tenants.csv"'); if (browserName !== "webkit") { if (testInfo.project.name !== "webkit") { - expect(importBody).toContain("tenant-alpha-id"); - } + expect(importBody).toContain("tenant-alpha-id"); + } } }); diff --git a/backend/internal/domain/hydra_models.go b/backend/internal/domain/hydra_models.go index 0a09ef5a..952fa17d 100644 --- a/backend/internal/domain/hydra_models.go +++ b/backend/internal/domain/hydra_models.go @@ -14,8 +14,8 @@ const ( MetadataIDTokenClaims = "id_token_claims" MetadataBackChannelLogoutURI = "backchannel_logout_uri" MetadataBackChannelLogoutSessionRequired = "backchannel_logout_session_required" - MetadataAutoLoginSupported = "auto_login_supported" - MetadataAutoLoginURL = "auto_login_url" + MetadataAutoLoginSupported = "auto_login_supported" + MetadataAutoLoginURL = "auto_login_url" ) type HydraClient struct { diff --git a/backend/internal/handler/auth_handler.go b/backend/internal/handler/auth_handler.go index e02f74f0..6f1d625b 100644 --- a/backend/internal/handler/auth_handler.go +++ b/backend/internal/handler/auth_handler.go @@ -85,21 +85,21 @@ const ( ) type AuthHandler struct { - SmsService domain.SmsService - EmailService domain.EmailService - RedisService domain.RedisRepository - HeadlessJWKS *service.HeadlessJWKSCacheService - KratosAdmin service.KratosAdminService - IdpProvider domain.IdentityProvider - AuditRepo domain.AuditRepository - OathkeeperRepo domain.OathkeeperLogRepository - Hydra *service.HydraAdminService - BackchannelLogout *service.BackchannelLogoutService - TenantService service.TenantService - KetoService service.KetoService - KetoOutboxRepo repository.KetoOutboxRepository - UserRepo repository.UserRepository - ConsentRepo repository.ClientConsentRepository + SmsService domain.SmsService + EmailService domain.EmailService + RedisService domain.RedisRepository + HeadlessJWKS *service.HeadlessJWKSCacheService + KratosAdmin service.KratosAdminService + IdpProvider domain.IdentityProvider + AuditRepo domain.AuditRepository + OathkeeperRepo domain.OathkeeperLogRepository + Hydra *service.HydraAdminService + BackchannelLogout *service.BackchannelLogoutService + TenantService service.TenantService + KetoService service.KetoService + KetoOutboxRepo repository.KetoOutboxRepository + UserRepo repository.UserRepository + ConsentRepo repository.ClientConsentRepository RPUserMetadataRepo repository.RPUserMetadataRepository } diff --git a/backend/internal/handler/tenant_handler_seed_delete_test.go b/backend/internal/handler/tenant_handler_seed_delete_test.go index b0bb2347..b4c1eae4 100644 --- a/backend/internal/handler/tenant_handler_seed_delete_test.go +++ b/backend/internal/handler/tenant_handler_seed_delete_test.go @@ -138,7 +138,7 @@ func TestTenantHandlerDeleteTenantsBulkRejectsSeedTenant(t *testing.T) { return c.Next() }) app.Delete("/tenants/bulk", (&TenantHandler{DB: db}).DeleteTenantsBulk) - body, _ := json.Marshal(map[string][]string{"ids": []string{seed.ID, normal.ID}}) + body, _ := json.Marshal(map[string][]string{"ids": {seed.ID, normal.ID}}) req := httptest.NewRequest(http.MethodDelete, "/tenants/bulk", bytes.NewReader(body)) req.Header.Set("Content-Type", "application/json") resp, err := app.Test(req) diff --git a/devfront/src/features/clients/ClientGeneralPage.tsx b/devfront/src/features/clients/ClientGeneralPage.tsx index a6dcd925..c0d76c06 100644 --- a/devfront/src/features/clients/ClientGeneralPage.tsx +++ b/devfront/src/features/clients/ClientGeneralPage.tsx @@ -339,10 +339,14 @@ function ClientGeneralPage() { const [initialStatus, setInitialStatus] = useState("active"); const [redirectUris, setRedirectUris] = useState(""); const [backchannelLogoutUri, setBackchannelLogoutUri] = useState(""); - const [backchannelLogoutSessionRequired, setBackchannelLogoutSessionRequired] = - useState(false); - const [isBackchannelSessionRequiredInfoOpen, setIsBackchannelSessionRequiredInfoOpen] = - useState(false); + const [ + backchannelLogoutSessionRequired, + setBackchannelLogoutSessionRequired, + ] = useState(false); + const [ + isBackchannelSessionRequiredInfoOpen, + setIsBackchannelSessionRequiredInfoOpen, + ] = useState(false); const [tenantAccessRestricted, setTenantAccessRestricted] = useState(false); const [allowedTenantIds, setAllowedTenantIds] = useState([]); const [tenantSearch, setTenantSearch] = useState(""); @@ -1610,9 +1614,7 @@ function ClientGeneralPage() { : "text-muted-foreground/60 hover:text-primary" }`} onClick={() => - setIsBackchannelSessionRequiredInfoOpen( - (prev) => !prev, - ) + setIsBackchannelSessionRequiredInfoOpen((prev) => !prev) } aria-label={t( "ui.dev.clients.general.backchannel_logout.session_required_info", @@ -1657,9 +1659,7 @@ function ClientGeneralPage() { id="backchannel-logout-session-required" checked={backchannelLogoutSessionRequired} onCheckedChange={setBackchannelLogoutSessionRequired} - disabled={ - isGeneralSettingsReadOnly || !hasBackchannelLogoutUri - } + disabled={isGeneralSettingsReadOnly || !hasBackchannelLogoutUri} /> diff --git a/locales/en.toml b/locales/en.toml index cb2f0aa3..f7129211 100644 --- a/locales/en.toml +++ b/locales/en.toml @@ -1095,6 +1095,7 @@ delete_selected = "Delete Selected" export_with_ids = "Include UUIDs" export_without_ids = "Export without UUIDs" import = "Import" +seed_badge = "Seed" title = "Tenant Registry" view_org_chart = "View Full Org Chart" @@ -1188,6 +1189,7 @@ import_partial_success = "Imported some organization data successfully." [msg.admin.tenants] delete_bulk_confirm = "Delete {{count}} selected tenants?" +seed_delete_blocked = "Seed tenants cannot be deleted." [msg.admin.users] self_delete_blocked = "You cannot delete your own account." diff --git a/locales/ko.toml b/locales/ko.toml index 29f63aa3..9ca45c99 100644 --- a/locales/ko.toml +++ b/locales/ko.toml @@ -1570,6 +1570,7 @@ user = "TENANT MEMBER" [ui.admin.tenants] add = "테넌트 추가" delete_selected = "선택 삭제" +seed_badge = "초기 설정" title = "테넌트 목록" view_org_chart = "전체 조직도 보기" @@ -1648,6 +1649,7 @@ import_partial_success = "일부 조직 정보를 가져왔습니다." [msg.admin.tenants] delete_bulk_confirm = "선택한 {{count}}개 테넌트를 삭제할까요?" +seed_delete_blocked = "초기 설정 테넌트는 삭제할 수 없습니다." [msg.admin.users] self_delete_blocked = "자신의 계정은 삭제할 수 없습니다." diff --git a/locales/template.toml b/locales/template.toml index fc9923c3..c3a94fdb 100644 --- a/locales/template.toml +++ b/locales/template.toml @@ -1439,6 +1439,7 @@ user = "" [ui.admin.tenants] add = "" delete_selected = "" +seed_badge = "" title = "" view_org_chart = "" @@ -1520,6 +1521,7 @@ delete_bulk_confirm = "" import_empty = "" import_error = "" import_result = "" +seed_delete_blocked = "" [msg.admin.tenants.import_preview] description = ""