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 2019/09/26 17:37:36 UTC

[GitHub] [incubator-superset] micimize opened a new issue #8302: Chart "save" behaviors not permission controlled

micimize opened a new issue #8302: Chart "save" behaviors not permission controlled
URL: https://github.com/apache/incubator-superset/issues/8302
 
 
   Chart save actions should be disabled in the UI when they are not allowed (save button, `ctrl-s`)
   
   ### Expected results
   
   * Save button is disabled when `can_add: false, can_overwrite: false`
   * `ctrl-s` is disabled and copy reflects it (less important)
   
   ### Actual results
   
   * Save button is not disabled when `can_add: false, can_overwrite: false`
   * The opened modal is broken/unresponsive
   * `ctrl-s` fires an overwrite attempt (regardless of permissions) and just fails due to undefined `data` results in
   https://github.com/apache/incubator-superset/blob/0a8f3eb43ff068a8612338015f605f1951ce57b6/superset/assets/src/explore/components/ExploreViewContainer.jsx#L189
   
   #### Screenshots
   
   ![image](https://user-images.githubusercontent.com/8343799/65710598-f0034200-e058-11e9-8e07-bfc1e9d1e577.png)
   
   #### How to reproduce the bug
   
   Go to a chart with a user who cannot overwrite or copy the chart
   
   ### Environment
   
   - superset version: container built from a fork of very-recent `master`
   
   ### Checklist
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [X] 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
   I think we can just add `can_add` to where [`can_overwrite`](https://github.com/apache/incubator-superset/blob/0a8f3eb43ff068a8612338015f605f1951ce57b6/superset/assets/src/explore/components/ExploreViewContainer.jsx#L361) is provided and pass it down properly to [`canAdd`](https://github.com/apache/incubator-superset/blob/0a8f3eb43ff068a8612338015f605f1951ce57b6/superset/assets/src/explore/components/ExploreViewContainer.jsx#L315).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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