john-bodley commented on a change in pull request #9422: Fix user impersonation
with presto
URL:
https://github.com/apache/incubator-superset/pull/9422#discussion_r400650359
##########
File path: superset/models/core.py
##########
@@ -288,9 +288,10 @@ def get_sqla_engine(
# If using MySQL or Presto for example, will set url.username
# If using Hive, will not do anything yet since that relies on a
# configuration parameter instead.
- self.db_engine_spec.modify_url_for_impersonation(
- sqlalchemy_url, self.impersonate_user, effective_username
- )
+ if not user_name or not str(sqlalchemy_url).startswith('presto'):
Review comment:
There shouldn't be any database specific logic in `core.py` hence the reason
for the `self.db_engine_spec.modify_url_for_impersonation(...)` method. You
should do something like
[this](https://github.com/apache/incubator-superset/blob/9f5f8e5d92f4d346acbedfbd2a1105f7194fea78/superset/db_engine_specs/hive.py#L396).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]