Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

feat: beta feature rls

mertmit44cf54b4ebd4
diff --git a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue
index 42155c7fb9..fc2e659b10 100644
--- a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue
+++ b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue
@@ -51,6 +51,8 @@ const { isLeftSidebarOpen } = storeToRefs(useSidebarStore())
const { showRecordPlanLimitExceededModal } = useEeConfig()
+const { isFeatureEnabled } = useBetaFeatureToggle()
+
// todo: temp
const { baseTables } = storeToRefs(useTablesStore())
const tables = computed(() => baseTables.value.get(base.value.id!) ?? [])
@@ -395,7 +397,10 @@ const enabledOptions = computed(() => {
tablePermission:
isEeUI && table.value?.type === 'table' && isUIAllowed('tablePermission', { roles: baseRole?.value, source: source.value }),
tableRowLevelSecurity:
- isEeUI && table.value?.type === 'table' && isUIAllowed('rlsManage', { roles: baseRole?.value, source: source.value }),
+ isEeUI &&
+ isFeatureEnabled(FEATURE_FLAG.ROW_LEVEL_SECURITY) &&
+ table.value?.type === 'table' &&
+ isUIAllowed('rlsManage', { roles: baseRole?.value, source: source.value }),
tableDelete: isUIAllowed('tableDelete', { roles: baseRole?.value, source: source.value }),
}
})
diff --git a/packages/nc-gui/composables/useBetaFeatureToggle.ts b/packages/nc-gui/composables/useBetaFeatureToggle.ts
index 3f30fc9ae3..cfab898002 100644
--- a/packages/nc-gui/composables/useBetaFeatureToggle.ts
+++ b/packages/nc-gui/composables/useBetaFeatureToggle.ts
@@ -18,6 +18,14 @@ const FEATURES = [
isEngineering: true,
isAdvanced: true,
},
+ {
+ id: 'row_level_security',
+ title: 'Row-Level Security',
+ description: 'Define filter-based policies to control which rows each role, team, or user can access.',
+ enabled: false,
+ version: 1,
+ isEE: true,
+ },
{
id: 'bases_v3',
title: 'Bases V3',