codeant-ai-for-open-source[bot] commented on code in PR #43887:
URL: https://github.com/apache/superset/pull/43887#discussion_r4048240994
##########
superset/semantic_layers/api.py:
##########
@@ -1083,10 +1087,12 @@ def _fetch_connection_items(
source_type: str,
name_filter: str | None,
) -> list[tuple[str, Any]]:
- """Fetch database and semantic layer items based on filters."""
+ """Fetch permitted sources using the same FAB identity as the route
gate."""
db_items: list[tuple[str, Database]] = []
- if source_type in ("all", "database"):
- db_q = db.session.query(Database).options(
+ if source_type in ("all", "database") and security_manager.has_access(
+ "can_read", "Database"
+ ):
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag uses of Flask-AppBuilder's has_access as missing anonymous
public-grant support when running the pinned FAB 5.2.3-compatible
implementation.
**Applied to:**
- `superset/semantic_layers/api.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]