ktmud commented on a change in pull request #12680:
URL: https://github.com/apache/superset/pull/12680#discussion_r566345234



##########
File path: superset/dashboards/filters.py
##########
@@ -107,9 +119,14 @@ def apply(self, query: Query, value: Any) -> Query:
         query = query.filter(
             or_(
                 Dashboard.id.in_(owner_ids_query),
-                Dashboard.id.in_(published_dash_query),
+                Dashboard.id.in_(datesource_perm_query),
                 Dashboard.id.in_(users_favorite_dash_query),
+                Dashboard.id.in_(roles_based_query),
             )
         )
 
         return query
+
+    @staticmethod
+    def has_no_role_based_access() -> bool:

Review comment:
       nit: we should avoid negation in naming, to [avoid future double 
negatives](https://www.gymglish.com/en/gymglish/english-grammar/avoiding-double-negative-constructions),
 i.e.
   
   ```
   not self.has_role_based_access()
   self.has_role_based_access()
   ```
   
   Reads nicer than
   
   ```
   self.has_no_role_based_access()
   not self.has_no_role_based_access()
   ```




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

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