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 && (
{t("ui.common.delete", "삭제")}
-
+ )}