Chart "save" behaviors not permission controlled
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-sis 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-sfires an overwrite attempt (regardless of permissions) and just fails due to undefineddataresults in https://github.com/apache/incubator-superset/blob/0a8f3eb43ff068a8612338015f605f1951ce57b6/superset/assets/src/explore/components/ExploreViewContainer.jsx#L189
Screenshots

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 is provided and pass it down properly to canAdd.
Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
any solution? I don't want other users to overwrite charts.
@Towhid1 if permissions are set correctly they can't, it just errors out when a user tries to
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
The patch for this from https://github.com/edf-org/incubator-superset/commit/cbc068fc4dfac9afbd7f27397c6531e9c24fcfe9#diff-a03acc80c87baf6ec15dd2d31f093d47

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
bump - code looks the same
@micimize would you be willing to open a PR, given that you have a patch in place?
@willbarrett sure! I narrowed the commit scope and will test locally and PR soon 👍
Awesome, thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
bump – rebased the PR against master