villebro commented on code in PR #19999:
URL: https://github.com/apache/superset/pull/19999#discussion_r871507011


##########
superset/connectors/sqla/models.py:
##########
@@ -1120,20 +1120,25 @@ def is_alias_used_in_orderby(col: ColumnElement) -> 
bool:
                 col.name = f"{col.name}__"
 
     def get_sqla_row_level_filters(
-        self, template_processor: BaseTemplateProcessor
+        self,
+        template_processor: BaseTemplateProcessor,
+        username: Optional[str] = None,
     ) -> List[TextClause]:
         """
-        Return the appropriate row level security filters for
-        this table and the current user.
-
-        :param BaseTemplateProcessor template_processor: The template
-        processor to apply to the filters.
+        Return the appropriate row level security filters for this table and 
the
+        current user. A custom username can be passed when the user is not 
present in the
+        Flask global namespace.
+
+        :param BaseTemplateProcessor template_processor: The template 
processor to apply
+        to the filters.
+        :param Optional[str] username: Optional username if there's no user in 
the Flask
+        global namespace.

Review Comment:
   nit: the types here are redundant as they're already in the signature



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