Skip to content

Conversation

@emacip
Copy link
Contributor

@emacip emacip commented Feb 6, 2019

Adding variable supersetCanCSV to check if the user has permission to download CSV in the dashboard.
Superset has a permission can_csv to check if we are allowed to export CSV or not.
This commit should fix the issues #6116, #6110

Screenshots:

Admin user with can_csv permission can export csv.
screenshot 2019-02-06 at 17 03 04

Remove can_csv permission from Gamma role.
screenshot 2019-02-06 at 17 03 39

Gamma user access to dashboard options without the export csv option.
screenshot 2019-02-06 at 17 04 21

@codecov-io
Copy link

Codecov Report

Merging #6821 into master will decrease coverage by <.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6821      +/-   ##
==========================================
- Coverage   56.16%   56.16%   -0.01%     
==========================================
  Files         527      527              
  Lines       23376    23379       +3     
  Branches     2794     2796       +2     
==========================================
+ Hits        13130    13131       +1     
- Misses       9836     9838       +2     
  Partials      410      410
Impacted Files Coverage Δ
.../src/dashboard/components/gridComponents/Chart.jsx 69.56% <ø> (ø) ⬆️
superset/assets/src/dashboard/containers/Chart.jsx 90.9% <ø> (ø) ⬆️
...t/assets/src/dashboard/reducers/getInitialState.js 0% <ø> (ø) ⬆️
...et/assets/src/dashboard/components/SliceHeader.jsx 24% <ø> (ø) ⬆️
...s/src/dashboard/components/SliceHeaderControls.jsx 10.86% <0%> (-0.5%) ⬇️
superset/views/core.py 75.03% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff9506f...788f932. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented Feb 6, 2019

Codecov Report

Merging #6821 into master will decrease coverage by <.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6821      +/-   ##
==========================================
- Coverage   56.16%   56.16%   -0.01%     
==========================================
  Files         527      527              
  Lines       23376    23379       +3     
  Branches     2794     2796       +2     
==========================================
+ Hits        13130    13131       +1     
- Misses       9836     9838       +2     
  Partials      410      410
Impacted Files Coverage Δ
.../src/dashboard/components/gridComponents/Chart.jsx 69.56% <ø> (ø) ⬆️
superset/assets/src/dashboard/containers/Chart.jsx 90.9% <ø> (ø) ⬆️
...t/assets/src/dashboard/reducers/getInitialState.js 0% <ø> (ø) ⬆️
...et/assets/src/dashboard/components/SliceHeader.jsx 24% <ø> (ø) ⬆️
...s/src/dashboard/components/SliceHeaderControls.jsx 10.86% <0%> (-0.5%) ⬇️
superset/views/core.py 75.03% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff9506f...788f932. Read the comment docs.

@emacip emacip changed the title [WIP] User can turn off download - export csv from a dashboard User can turn off download - export csv from a dashboard Feb 7, 2019
@kristw kristw added enhancement:request Enhancement request submitted by anyone from the community review labels Feb 7, 2019
Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graceguo-supercat graceguo-supercat merged commit 4a30094 into apache:master Mar 16, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 First shipped in 0.34.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels enhancement:request Enhancement request submitted by anyone from the community 🚢 0.34.0 First shipped in 0.34.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants