Gamma users can create charts for the data source they don't have access
Gamma users can create charts for the data source they don't have access. I believe it is not supposed to be like this, so if it can be confirmed as a bug, I would like to create PR.
Expected results
When Gamma users create a chart, they should be able to create ones only for the datasource they have access.
Actual results
Gamma users can see all of data sources.
Screenshots
Gamma user can see all the datasources when creating charts, event he ones they don't have access. This is wrong, I believe.
On the other hand, they can see only tables they are allowed to see in Sources -> Tables, and it is correct.
How to reproduce the bug
- Clone superset from GitHub, follow development setup as described, and load example data.
- Create a role called FlightRole and add [datasource access on [examples].flights].
- Create a new user and give the user Gamma and FlightRole.
- Login with new user.
- Click Charts and add a new chart.
- Expand 'Choose a datasource' drop box and see there are more datasources than allowed.
Environment
- superset version: master (ccedbea5)
- python version: 3.6.7
- node.js version: 11.9.0
- npm version: 6.5.0
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. -- I found two similar ones but they are old, closed, and don't have any response, so I open new one.
Additional context
Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.53. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
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.
Please reopen this issue.
Any user should be able to see only those datasets which he has access to in the chart creation dropdown. This bug still exists in latest master. Are there any workarounds for this.
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.
Please reopen this issue as the bug clearly exists as of now as well.