π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
feat: RLS badge and disable auto-save
mertmit5c6ea2be523c
diff --git a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vueindex 0499f850be..53f6a66bce 100644--- a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue+++ b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue@@ -496,6 +496,11 @@ const enabledOptions = computed(() => {</span></NcTooltip><div v-if="!isEditing" class="flex items-center">+ <NcTooltip v-if="table.meta?.is_rls_enabled" placement="bottom">+ <template #title> Row-level security is enabled. Some rows may be hidden based on your access permissions. </template>+ <GeneralIcon icon="ncShield" class="!w-3.5 !h-3.5 flex-none text-nc-content-gray-subtle2" />+ </NcTooltip>+<NcTooltip v-if="table.description?.length" placement="bottom"><template #title><div class="whitespace-pre-wrap break-words">{{ table.description }}</div>diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vueindex 7aa2da5d3c..b7dec5ae61 100644--- a/packages/nc-gui/components/smartsheet/Cell.vue+++ b/packages/nc-gui/components/smartsheet/Cell.vue@@ -100,6 +100,8 @@ const syncValue = useDebounceFn({ maxWait: 2000 },)+const isRlsEnabled = computed(() => parseProp(meta.value?.meta)?.is_rls_enabled === true)+const isCanvasInjected = inject(IsCanvasInjectionInj, false)onBeforeUnmount(() => {@@ -109,6 +111,15 @@ onBeforeUnmount(() => {emitSave()})+// Non-canvas RLS: save on blur (when editEnabled goes true β false)+watch(editEnabled, (newVal, oldVal) => {+ if (!isRlsEnabled.value || isCanvasInjected) return+ if (oldVal && !newVal && currentRow.value.rowMeta.changed) {+ currentRow.value.rowMeta.changed = false+ emitSave()+ }+})+let saveTimer: numberconst updateWhenEditCompleted = () => {@@ -138,6 +149,9 @@ const vModel = computed({emit('update:modelValue', val)if (column.value.pk || column.value.unique) {updateWhenEditCompleted()+ } else if (isAutoSaved(column.value) && isRlsEnabled.value) {+ // RLS enabled: skip debounced auto-save to prevent row disappearing mid-edit.+ // Save will happen on blur (editEnabled watcher) or cell unmount (canvas).} else if (isAutoSaved(column.value)) {syncValue()} else if (!isManualSaved(column.value)) {