codeant-ai-for-open-source[bot] commented on code in PR #37516:
URL: https://github.com/apache/superset/pull/37516#discussion_r3656238889
##########
superset/common/query_context_processor.py:
##########
@@ -551,7 +1013,7 @@ def raise_for_access(self) -> None:
# come first to avoid rendering caller-supplied input for a resource
the
# caller is not allowed to access.
if self._qc_datasource.type == DatasourceType.QUERY:
- security_manager.raise_for_access(query=self._qc_datasource)
+ cast("SqlLabQuery", self._qc_datasource).raise_for_explore_access()
else:
security_manager.raise_for_access(query_context=self._query_context)
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag the use of `raise_for_explore_access()` for
`DatasourceType.QUERY` here; SQL Lab-backed queries require the rendered SQL
and this method already routes through `security_manager.raise_for_access(...)`
with the necessary owner check.
**Applied to:**
- `superset/common/query_context_processor.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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]