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/08/17 15:03:06 UTC

[GitHub] [superset] rickysaltzer commented on issue #20455: current_user not working in DB_CONNECTION_MUTATOR while in SqlLab

rickysaltzer commented on issue #20455:
URL: https://github.com/apache/superset/issues/20455#issuecomment-1218132855

   Looking into this issue a bit further, and it appears that the issue is hit upon accessing the user from the SAM (not even setting). 
   
   ```python
   def DB_CONNECTION_MUTATOR(uri, params, username, security_manager, source):
       # The following just accesses the user from the SAM, but does not actually set it.
       # - the same behavior occurs if you access `g` directly. 
       accessing_user_tmp = security_manager.current_user.username
       return uri, params
   ```
   
   Resulting in:
   ```python
   '_AppCtxGlobals' object has no attribute 'user'
   ```


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