-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: skip perms on query context update #16250
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16250 +/- ##
==========================================
- Coverage 76.75% 76.53% -0.23%
==========================================
Files 997 997
Lines 53195 53198 +3
Branches 6764 6764
==========================================
- Hits 40830 40715 -115
- Misses 12135 12253 +118
Partials 230 230
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Looks good, but question for my understanding, why couldn't we give the machine user permission for the charts that it doesn't own? |
I think we'd need to add the machine user as an owner to all the charts in order to do that, which would require hooks for new charts, and could potentially be confusing to the user (why is "machine" also an owner of my chart?). It would also allow the machine user to delete or modify charts, while with the approach in this PR we only let it update |
(cherry picked from commit 2611681)
…gies * upstream/master: (64 commits) check roles before fetching reports (#16260) chore: upgrade mypy and add type guards (#16227) fix: pivot columns with ints for name (#16259) chore(pylint): Bump Pylint to 2.9.6 (#16146) fix examples tab for dashboard (#16253) chore: bump superset-ui packages to 0.17.84 (#16251) chore: Shows the dataset description in the gallery dropdown (#16200) fix(Dashboard): Omnibar dropdown visibility and keyboard commands (#16168) chore: bump py version for integration test (#16213) fix: skip perms on query context update (#16250) refactor: external metadata fetch API (#16193) feat(dao): admin can remove self from object owners (#15149) fix(dashboard): cross filter chart highlight when filters badge icon clicked (#16233) fix: validate_parameters and query (#16241) fix: Remove Advanced Analytics tag for 2 charts (#16240) Revert "feat: Changing Dataset names (#16199)" (#16235) feat: Allow users to connect via legacy SQLA form (#16201) fix: remove encryption from db params (#16214) fix(Explore): Show the tooltip only when label does not fit the container in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (#16060) Show/hide tooltips (#16192) ... # Conflicts: # superset/tasks/caching/cache_strategy.py
SUMMARY
When building a CSV report for an old chart, the worker needs to fetch a screenshot of the chart in order to populate the
query_context
column of the chart. This is needed to request CSV data for the chart if it hasn't been saved with itsquery_context
.One problem in doing this is that the worker generating the report might not own the chart, so they are unable to populate
query_context
. I added a check to bypass the permission check only when the request is just forquery_object
.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
query_context
is null).ADDITIONAL INFORMATION