You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/09 18:41:09 UTC

[GitHub] [superset] betodealmeida commented on a diff in pull request #19999: feat: RLS for SQL Lab

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


##########
superset/sql_lab.py:
##########
@@ -366,6 +388,9 @@ 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"):
+        g.user = security_manager.find_user(username=user_name)

Review Comment:
   SQL Lab doesn't have the `g.user` context, since it might run in Celery workers.



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org