john-bodley commented on code in PR #20492:
URL: https://github.com/apache/superset/pull/20492#discussion_r906222351


##########
superset/dashboards/filters.py:
##########
@@ -57,9 +58,9 @@ def apply(self, query: Query, value: Any) -> Query:
         return query.filter(
             or_(
                 Dashboard.created_by_fk  # pylint: 
disable=comparison-with-callable
-                == g.user.get_user_id(),

Review Comment:
   The 
[get_user_id](https://github.com/dpgaspar/Flask-AppBuilder/blob/090ddb4645992fb390da93906301c63b204db0df/flask_appbuilder/security/sqla/models.py#L141-L146)
 method is a classmethod and thus doesn't return the ID associated with the 
`user` object but rather the `g.user.id`. In this case they're the same but 
it's very misleading.



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