EnxDev commented on code in PR #44653:
URL: https://github.com/apache/superset/pull/44653#discussion_r4131395563
##########
superset/db_engine_specs/snowflake.py:
##########
@@ -353,10 +353,8 @@ def impersonate_user(
# leaving the default/service-account username paired
# with this user's OAuth token. Use it as given.
url = url.set(username=username)
- else:
- user = security_manager.find_user(username=username)
- if user and user.email:
- url = url.set(username=user.email)
+ elif email := database.get_impersonation_email():
Review Comment:
This is the one changed branch that no test reaches (it's the 2 lines
codecov flags). `test_impersonate_user` patches the flag on, so it only
exercises the `if` above.
A quick case with the flag off, a `user_token`, and
`database.get_impersonation_email` returning an address would lock in that the
URL username becomes the email.
--
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]