You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/11/17 22:26:46 UTC
[superset] 01/01: set out export
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch update-export-rbac
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 101762e5a3f3fc46817efd8b89d21ac0d209c491
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Nov 17 17:24:19 2021 -0500
set out export
---
superset-frontend/src/views/CRUD/chart/ChartCard.tsx | 2 +-
superset-frontend/src/views/CRUD/chart/ChartList.tsx | 2 +-
superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx | 2 +-
superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx | 2 +-
superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx | 2 +-
superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx | 2 +-
superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx | 2 +-
superset/constants.py | 1 -
8 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
index 96a384e..2dbbaa8 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx
@@ -66,7 +66,7 @@ export default function ChartCard({
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
- hasPerm('can_read') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
+ hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const theme = useTheme();
const menu = (
diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
index 6eed27e..19866e2 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
@@ -182,7 +182,7 @@ function ChartList(props: ChartListProps) {
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
- hasPerm('can_read') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
+ hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const initialSort = [{ id: 'changed_on_delta_humanized', desc: true }];
const handleBulkChartExport = (chartsToExport: Chart[]) => {
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx
index 5f84e41..10802cd 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardCard.tsx
@@ -66,7 +66,7 @@ function DashboardCard({
const history = useHistory();
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
- const canExport = hasPerm('can_read');
+ const canExport = hasPerm('can_export');
const theme = useTheme();
const menu = (
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
index 9ae2e4a..edd81d8 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
@@ -148,7 +148,7 @@ function DashboardList(props: DashboardListProps) {
const canCreate = hasPerm('can_write');
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
- const canExport = hasPerm('can_read');
+ const canExport = hasPerm('can_export');
const initialSort = [{ id: 'changed_on_delta_humanized', desc: true }];
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
index a489240..c5a0183 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseList.tsx
@@ -163,7 +163,7 @@ function DatabaseList({ addDangerToast, addSuccessToast }: DatabaseListProps) {
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
- hasPerm('can_read') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
+ hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const menuData: SubMenuProps = {
activeChild: 'Databases',
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
index 2ef0924..ea3048c 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
@@ -152,7 +152,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canCreate = hasPerm('can_write');
- const canExport = hasPerm('can_read');
+ const canExport = hasPerm('can_export');
const initialSort = SORT_BY;
diff --git a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx b/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx
index d6df355..f6d27a4 100644
--- a/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx
+++ b/superset-frontend/src/views/CRUD/data/savedquery/SavedQueryList.tsx
@@ -133,7 +133,7 @@ function SavedQueryList({
const canEdit = hasPerm('can_write');
const canDelete = hasPerm('can_write');
const canExport =
- hasPerm('can_read') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
+ hasPerm('can_export') && isFeatureEnabled(FeatureFlag.VERSIONED_EXPORT);
const openNewQuery = () => {
window.open(`${window.location.origin}/superset/sqllab?new=true`);
diff --git a/superset/constants.py b/superset/constants.py
index 6ea189b..bffb02c 100644
--- a/superset/constants.py
+++ b/superset/constants.py
@@ -100,7 +100,6 @@ MODEL_API_RW_METHOD_PERMISSION_MAP = {
"bulk_delete": "write",
"delete": "write",
"distinct": "read",
- "export": "read",
"get": "read",
"get_list": "read",
"info": "read",