You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/04/05 18:11:18 UTC

[GitHub] [superset] Larissa-Rocha opened a new issue, #19535: Not possible to disable export to json on charts

Larissa-Rocha opened a new issue, #19535:
URL: https://github.com/apache/superset/issues/19535

   I'm not sure if it's a bug, but I'm try to disable the "export to .json" feature on the menu of charts by removing the "can slice json on superset" permission and it keeps enabled. 
   I noticed that [here](https://github.com/apache/superset/blob/1a1322d3d92960416a4874997b53aec3bd59eff6/superset-frontend/src/explore/components/ExploreAdditionalActionsMenu/index.jsx#L337) in the export to json Menu Item there is no `disabled` tag, so maybe thats the expected behavior after all, if that's the case, how can I prevent the user from exporting json data? 
   
   #### How to reproduce the bug
   
   1. Remove the "can slice json on superset" permission to the Admin role (if you're admin user)
   2. Go to any chart and click on the .json button on top right
   3. See the json data be generated
   
   ### Expected results
   
   I expected to disable the button .json, likewise when I remove the "can csv on superset" permission.
   
   ### Actual results
   
   I'm able to see the json data.
   
   #### Screenshots
   
   ![image](https://user-images.githubusercontent.com/69212483/161820048-655a116f-e5b9-4345-bd17-3ec1766cba9e.png)
   Here I removed "can slice json on superset" and "can csv on superset" permissions, the csv option is disabled but the json option keeps enabledd.
   
   
   ### Environment
   
   - browser type and version: Google Chrome v. 99.0.4844.84
   - superset version: `1.4.1`
   - python version: `python --version`
   - node.js version: `node -v`
   - any feature flags active:
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Larissa-Rocha commented on issue #19535: Not possible to disable export to json on charts

Posted by GitBox <gi...@apache.org>.
Larissa-Rocha commented on issue #19535:
URL: https://github.com/apache/superset/issues/19535#issuecomment-1090328068

   @villebro thanks for your reply. Yes, I can open a PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Not possible to disable export to json on charts [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #19535:
URL: https://github.com/apache/superset/issues/19535#issuecomment-1946883259

   Trying to rekindle the effort on that PR. The UI of this has changed quite a bit since the issue was opened... maybe that has something to do with the test issues on the PR? ¯\\\_(ツ)_/¯ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #19535: Not possible to disable export to json on charts

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #19535:
URL: https://github.com/apache/superset/issues/19535#issuecomment-1090130261

   Good catch @Larissa-Rocha! The `disabled={!canDownloadCSV}` should definitely be added to the JSON export item, too (`canDownloadCSV` is equivalent to "is allowed to download tabular data"). Would you be able to open a PR fixing that?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] Larissa-Rocha closed issue #19535: Not possible to disable export to json on charts

Posted by GitBox <gi...@apache.org>.
Larissa-Rocha closed issue #19535: Not possible to disable export to json on charts
URL: https://github.com/apache/superset/issues/19535


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on issue #19535: Not possible to disable export to json on charts

Posted by GitBox <gi...@apache.org>.
villebro commented on issue #19535:
URL: https://github.com/apache/superset/issues/19535#issuecomment-1090351083

   FYI @Larissa-Rocha, I'm leaving this issue open until the fix PR is merged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] rusackas commented on issue #19535: Not possible to disable export to json on charts

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #19535:
URL: https://github.com/apache/superset/issues/19535#issuecomment-1402800067

   Hoping we can get this one closed soon... Hopefully @mgorsk1 's PR can get merged soon. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org