From dd80f95bf654f95b743da88df706f6b58b38b981 Mon Sep 17 00:00:00 2001 From: John Bodley Date: Mon, 13 Jun 2022 15:21:34 -0700 Subject: [PATCH] fix(VERSIONED_EXPORTS): Ensure dashboards and charts adher to the VERSIONED_EXPORTS feature flag --- superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx | 3 ++- superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx index a00ceefbc8761..7dbb30159d91e 100644 --- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx +++ b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx @@ -153,7 +153,8 @@ function DashboardList(props: DashboardListProps) { const canCreate = hasPerm('can_write'); const canEdit = hasPerm('can_write'); const canDelete = hasPerm('can_write'); - const canExport = hasPerm('can_export'); + const canExport = + hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT); const initialSort = [{ id: 'changed_on_delta_humanized', desc: true }]; diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx index 7d6373b935d35..80428a9a13c76 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx +++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx @@ -174,7 +174,8 @@ const DatasetList: FunctionComponent = ({ const canEdit = hasPerm('can_write'); const canDelete = hasPerm('can_write'); const canCreate = hasPerm('can_write'); - const canExport = hasPerm('can_export'); + const canExport = + hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT); const initialSort = SORT_BY;