alexandrusoare commented on code in PR #45451:
URL: https://github.com/apache/superset/pull/45451#discussion_r4324789689


##########
superset/dashboards/filters.py:
##########
@@ -130,6 +131,12 @@ def apply(self, query: Query, value: Any) -> Query:
         if (guest_condition := guest_embedded_dashboard_filter()) is not None:
             return query.filter(guest_condition)
 
+        # Applied before the short-circuit below: an exclusion has to hold for
+        # admins too, since that is precisely the principal the role paths stop
+        # narrowing. Guests are excepted above -- their token already scopes
+        # them.
+        query = apply_extra_access_exclusions(query, "dashboards", 
Dashboard.id)

Review Comment:
   The UUID branch now consults the exclusion and raises 
DashboardNotFoundError, and there's a test asserting both identifiers are 
refused for the same withheld dashboard.



-- 
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]

Reply via email to