From 2820ca941ded96f466d187aec7f969c8350d35ab Mon Sep 17 00:00:00 2001 From: chan Date: Fri, 12 Jun 2026 15:50:46 +0900 Subject: [PATCH] =?UTF-8?q?adminfront:=20TenantListPage=EC=97=90=20?= =?UTF-8?q?=EC=84=B8=EB=B6=80=20=EA=B8=B0=EB=8A=A5=20=EA=B6=8C=ED=95=9C(te?= =?UTF-8?q?nants=20/=20manage=5Ftenants)=20=EC=9A=B0=ED=9A=8C=20=EB=B0=8F?= =?UTF-8?q?=20=EC=A0=9C=EC=96=B4=20=EC=A0=84=EA=B2=A9=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EC=97=AC=20=EC=A0=91=EA=B7=BC=20=EC=A0=9C=ED=95=9C=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenants/routes/TenantListPage.tsx | 163 +++++++++--------- 1 file changed, 83 insertions(+), 80 deletions(-) diff --git a/adminfront/src/features/tenants/routes/TenantListPage.tsx b/adminfront/src/features/tenants/routes/TenantListPage.tsx index 40fa5418..dc8cbc2b 100644 --- a/adminfront/src/features/tenants/routes/TenantListPage.tsx +++ b/adminfront/src/features/tenants/routes/TenantListPage.tsx @@ -377,6 +377,7 @@ function TenantListPage() { queryFn: fetchMe, }); const profileRole = normalizeAdminRole(profile?.role); + const isWritable = profileRole === "super_admin" || !!profile?.systemPermissions?.manage_tenants; const query = useInfiniteQuery({ queryKey: ["tenants", "lazy", debouncedSearch, scopeTenantId], @@ -581,7 +582,7 @@ function TenantListPage() { return () => window.removeEventListener("message", onMessage); }, [allTenants, scopePickerOpen]); - if (profile && profileRole !== "super_admin") { + if (profile && profileRole !== "super_admin" && !profile?.systemPermissions?.tenants) { return (

@@ -840,81 +841,83 @@ function TenantListPage() { } actions={ <> - - - - - - - - - - {t( - "ui.admin.tenants.csv_template", - "템플릿 다운로드", - )} - - - fileInputRef.current?.click()} - disabled={importMutation.isPending} - data-testid="tenant-import-menu-item" - className="cursor-pointer" - > - - {t("ui.admin.tenants.import", "CSV 가져오기")} - - - exportMutation.mutate(false)} - disabled={exportMutation.isPending} - data-testid="tenant-export-menu-item" - className="cursor-pointer" - > - - {t( - "ui.admin.tenants.export_without_ids", - "UUID 제외 내보내기", - )} - - exportMutation.mutate(true)} - disabled={exportMutation.isPending} - data-testid="tenant-export-with-ids-menu-item" - className="cursor-pointer" - > - - {t( - "ui.admin.tenants.export_with_ids", - "UUID 포함 내보내기", - )} - - - - + {isWritable && ( + <> + + + + + + + + + {t( + "ui.admin.tenants.csv_template", + "템플릿 다운로드", + )} + + + fileInputRef.current?.click()} + disabled={importMutation.isPending} + data-testid="tenant-import-menu-item" + className="cursor-pointer" + > + + {t("ui.admin.tenants.import", "CSV 가져오기")} + + + exportMutation.mutate(false)} + disabled={exportMutation.isPending} + data-testid="tenant-export-menu-item" + className="cursor-pointer" + > + + {t( + "ui.admin.tenants.export_without_ids", + "UUID 제외 내보내기", + )} + + exportMutation.mutate(true)} + disabled={exportMutation.isPending} + data-testid="tenant-export-with-ids-menu-item" + className="cursor-pointer" + > + + {t( + "ui.admin.tenants.export_with_ids", + "UUID 포함 내보내기", + )} + + + + + )} - + {isWritable && ( - + )} } /> @@ -1071,7 +1074,7 @@ function TenantListPage() { {t("ui.common.apply", "적용")}
- + {isWritable && ( - + )}