dpgaspar commented on code in PR #19999:
URL: https://github.com/apache/superset/pull/19999#discussion_r870180614
##########
superset/security/manager.py:
##########
@@ -1144,63 +1148,66 @@ def get_rls_filters(self, table: "BaseDatasource") ->
List[SqlaQuery]:
:returns: A list of filters
"""
if hasattr(g, "user"):
- # pylint: disable=import-outside-toplevel
- from superset.connectors.sqla.models import (
- RLSFilterRoles,
- RLSFilterTables,
- RowLevelSecurityFilter,
- )
+ user = g.user
+ elif username:
+ user = self.find_user(username=username)
+ else:
+ return []
Review Comment:
nice if flip, less indentation
--
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]