mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
exporterRoles table
This commit is contained in:
@@ -103,13 +103,19 @@ export default function TableToolbar() {
|
||||
<ImportData />
|
||||
</Suspense>
|
||||
)}
|
||||
<Suspense fallback={<ButtonSkeleton />}>
|
||||
<TableToolbarButton
|
||||
title="Export/Download"
|
||||
onClick={() => openTableModal("export")}
|
||||
icon={<ExportIcon />}
|
||||
/>
|
||||
</Suspense>
|
||||
{(!projectSettings.exporterRoles ||
|
||||
projectSettings.exporterRoles.length === 0 ||
|
||||
userRoles.some((role) =>
|
||||
projectSettings.exporterRoles?.includes(role)
|
||||
)) && (
|
||||
<Suspense fallback={<ButtonSkeleton />}>
|
||||
<TableToolbarButton
|
||||
title="Export/Download"
|
||||
onClick={() => openTableModal("export")}
|
||||
icon={<ExportIcon />}
|
||||
/>
|
||||
</Suspense>
|
||||
)}
|
||||
{userRoles.includes("ADMIN") && (
|
||||
<>
|
||||
<div /> {/* Spacer */}
|
||||
|
||||
1
src/types/settings.d.ts
vendored
1
src/types/settings.d.ts
vendored
@@ -32,6 +32,7 @@ export type ProjectSettings = Partial<{
|
||||
builder: string;
|
||||
terminal: string;
|
||||
}>;
|
||||
exporterRoles?: string[];
|
||||
}>;
|
||||
|
||||
/** User info and settings */
|
||||
|
||||
Reference in New Issue
Block a user