sadpandajoe commented on code in PR #42590:
URL: https://github.com/apache/superset/pull/42590#discussion_r3867773663
##########
superset/explore/utils.py:
##########
@@ -53,7 +53,12 @@ def check_query_access(query_id: int) -> Optional[bool]:
# Access checks below, no need to validate them twice as they can be
expensive.
query = QueryDAO.find_by_id(query_id, skip_base_filter=True)
if query:
- security_manager.raise_for_access(query=query)
+ # This is the one-time explore/create-chart transition the
+ # query-authorship bypass in raise_for_access is meant to
+ # cover; see allow_query_authorship_bypass's docstring there.
+ security_manager.raise_for_access(
+ query=query, allow_query_authorship_bypass=True
Review Comment:
This only authorizes the form-data POST: the resulting Explore page still
calls `raise_for_access(datasource=...)` without this opt-in and returns 403
for the same query author with no datasource grant. Could the initial Explore
load be covered by the intended transition, with an end-to-end regression, so
Create Chart does not produce a key for a page the author cannot open?
--
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]