You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2024/02/06 15:26:58 UTC
(superset) 01/02: Rename canDrillBy to permission name
This is an automated email from the ASF dual-hosted git repository.
diegopucci pushed a commit to branch diego/ch77449/dashboard-granular-permissions
in repository https://gitbox.apache.org/repos/asf/superset.git
commit c3cd6f4b76293577ba84d772613f1e26551cf98a
Author: geido <di...@gmail.com>
AuthorDate: Tue Feb 6 13:26:47 2024 +0200
Rename canDrillBy to permission name
---
.../src/components/Chart/ChartContextMenu/ChartContextMenu.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx
index 1e7fcf3d7f..63a5f2b25b 100644
--- a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx
+++ b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx
@@ -90,7 +90,7 @@ const ChartContextMenu = (
const canExplore = useSelector((state: RootState) =>
findPermission('can_explore', 'Superset', state.user?.roles),
);
- const canDrillBy = useSelector((state: RootState) =>
+ const canWriteExploreFormData = useSelector((state: RootState) =>
findPermission('can_write', 'ExploreFormDataRestAPI', state.user?.roles),
);
const canDrillToDetail = useSelector((state: RootState) =>
@@ -122,7 +122,7 @@ const ChartContextMenu = (
const showDrillBy =
isFeatureEnabled(FeatureFlag.DrillBy) &&
- (canExplore || canDrillBy) &&
+ (canExplore || canWriteExploreFormData) &&
isDisplayed(ContextMenuItem.DrillBy);
const showCrossFilters =