betodealmeida opened a new pull request #16250:
URL: https://github.com/apache/superset/pull/16250


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   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 its `query_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 for `query_object`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ![Screenshot 2021-08-13 at 08-25-47 
Superset](https://user-images.githubusercontent.com/1534870/129382243-a0cc59b6-c296-4bcd-a09d-f3333b7dd525.png)
   
   ![Screenshot 2021-08-13 at 08-25-27  Report  Test 2 Most Populated Countries 
- ralmeida gmail com - 
Gmail](https://user-images.githubusercontent.com/1534870/129382248-1c809c00-b839-47f9-9cc5-ccc95b59e3d6.png)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   1. Create a CSV report of a chart from the examples **that hasn't been 
opened yet** (so that `query_context` is null).
   2. Configure screenshots with a low-level user that doesn't own the chart 
(ie, not "admin").
   3. Reports should work fine.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to