codeant-ai-for-open-source[bot] commented on code in PR #45535:
URL: https://github.com/apache/superset/pull/45535#discussion_r4330934095
##########
superset/mcp_service/dashboard/tool/generate_dashboard.py:
##########
@@ -262,13 +262,19 @@ def generate_dashboard( # noqa: C901
),
)
- # Validate dataset access for each chart.
+ # Validate dataset access as well as chart visibility.
# check_chart_data_access is the centralized data-level
# permission check that complements the class-level RBAC
# enforced by mcp_auth_hook.
from superset.mcp_service.auth import check_chart_data_access
for chart in chart_objects:
+ if not security_manager.can_access_chart(chart):
Review Comment:
✅ **CodeAnt verified this suggestion was addressed in subsequent commits and
marked this thread resolved** as of `ba71a24`.
The chart query now uses `selectinload` for `Slice.editors` and
`Slice.viewers`, avoiding per-chart lazy-loading queries during access checks.
<sub>If that's not right, unresolve this thread and CodeAnt will leave it
open.</sub>
<!-- codeant-auto-resolve-reply -->
--
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]