codeant-ai-for-open-source[bot] commented on code in PR #45538:
URL: https://github.com/apache/superset/pull/45538#discussion_r4340081923
##########
superset/daos/dashboard.py:
##########
@@ -660,6 +713,10 @@ def set_dash_metadata( # noqa: C901
current_slices = (
db.session.query(Slice).filter(Slice.id.in_(slice_ids)).all()
)
+ _raise_for_unreadable_new_charts(
+ current_slices,
+ _member_chart_ids(dashboard.id) | (allowed_chart_ids or
set()),
+ )
Review Comment:
Yes. Reuse `prefetch_chart_access()` for the charts not already in
`allowed_chart_ids` before calling `can_access_chart`. That batches the
editor/viewer loads while preserving the existing authorization check and its
behavior; already-allowed members remain skipped. This is a worthwhile fix for
layouts with many newly referenced charts.
--
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]