Kunal8954 commented on code in PR #44169:
URL: https://github.com/apache/superset/pull/44169#discussion_r4016950067
##########
superset/charts/filters.py:
##########
@@ -163,7 +175,21 @@ def _apply_viewers(self, query: Query) -> Query:
)
)
)
- filters.append(Slice.id.in_(no_viewer_query))
+ filters.append(Slice.id.in_(no_viewer_table_query))
+
+ # SEMANTIC_VIEW charts have no SqlaTable/Database row to join; access
is
+ # evaluated against the chart's own perm, which set_related_perm keeps
in
+ # sync with the view's ``datasource_access`` perm (no numeric-id join).
+ no_viewer_semantic_view_query = db.session.query(Slice.id).filter(
+ and_(
+ Slice.datasource_type == DatasourceType.SEMANTIC_VIEW,
+ ~chart_has_viewers,
+ Slice.perm.in_(
Review Comment:
I’ll trace the rename hooks and make sure existing slices keep their
permissions in sync after a semantic-view rename.
--
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]