From d558b6508af904e5cf16be8a4fa79fa421a96409 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Wed, 9 Sep 2026 17:19:30 +0200 Subject: [PATCH] chore(datatables): don't mount the roles UI until the ACL editor lands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enforcement ships first. The permissions drawer is what turns roles on, and the catalog section is what creates them — both are only useful once there is a way to grant a role the privileges it needs, which arrives with the ACL editor. Left mounted they would offer a feature whose other half does not exist. The two components are complete and reviewed; only their call sites here are commented out, with a note pointing the follow-up PRs at them. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01BjfMkJyKzodxkobqGZ6Lqb --- .../DataTableSettings.svelte | 132 +++++++++++------- 1 file changed, 78 insertions(+), 54 deletions(-) diff --git a/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte b/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte index 9c2d64998b..4cda99cb4a 100644 --- a/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte +++ b/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte @@ -92,7 +92,8 @@ type GetSettingsResponse, type TestDataTableConnectionResponse } from '$lib/gen' - import { superadmin, workspaceStore } from '$lib/stores' + // `superadmin` gates the commented-out roles section at the bottom; restore it there. + import { workspaceStore } from '$lib/stores' import { createAsyncConfirmationModal } from '../common/confirmationModal/asyncConfirmationModal.svelte' import ConfirmationModal from '../common/confirmationModal/ConfirmationModal.svelte' import { resource } from 'runed' @@ -100,8 +101,10 @@ import { Popover } from '../meltComponents' import ExploreAssetButton from '../ExploreAssetButton.svelte' import DataTableMigrationsButton from './DataTableMigrationsButton.svelte' - import DataTablePermissionsButton from './DataTablePermissionsButton.svelte' - import DataTableRolesSection from './DataTableRolesSection.svelte' + // Both components are complete and reviewed; their call sites in this file are commented + // out until the ACL editor lands. Uncomment these with them. + // import DataTablePermissionsButton from './DataTablePermissionsButton.svelte' + // import DataTableRolesSection from './DataTableRolesSection.svelte' import { deepEqual } from 'fast-equals' import { clone } from '$lib/utils' import SettingsFooter from './SettingsFooter.svelte' @@ -398,64 +401,67 @@ / {dataTable.reference.datatable} - This fork uses its parent's data table rather than a copy of it, so the database - and its roles are decided in that workspace. + This fork uses its parent's data table rather than a copy of it, so the database and + its roles are decided in that workspace. {:else} -
-
- {#if dataTable.database.resource_type === 'instance'} - - Use Windmill's PostgreSQL instance - - {/if} - dataTable.database.resource_type, + (resource_type) => { + dataTable.database = { + resource_type, + resource_path: + resource_type === 'instance' ? defaultInstanceDbName() : undefined + } } } - } - id="database-type-select" - class="w-28" - /> -
-
- {#if dataTable.database.resource_type !== 'instance'} - - {:else} - - {/if} +
+
+ {#if dataTable.database.resource_type !== 'instance'} + + {:else} + + {/if} +
- {/if} @@ -466,11 +472,21 @@ datatable={dataTable.name} disabled={!!dirtyMap[dataTable.name]} /> +