betodealmeida commented on code in PR #19999:
URL: https://github.com/apache/superset/pull/19999#discussion_r869302270
##########
superset/sql_lab.py:
##########
@@ -366,6 +386,10 @@ def execute_sql_statements( # pylint:
disable=too-many-arguments, too-many-loca
# only asynchronous queries
stats_logger.timing("sqllab.query.time_pending", now_as_float() -
start_time)
+ if not hasattr(g, "user"):
+ # pylint: disable=assigning-non-slot
+ g.user = security_manager.find_user(username=user_name)
Review Comment:
This path ends up calling the security manager to get the RLS rules, which
is why I was setting `g.user`. But I can change it to pass the username
instead, would that be better?
--
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]