Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send username in sync request #6113

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

youngyjd
Copy link
Contributor

@youngyjd youngyjd commented Oct 15, 2018

user_name is sent to sql_lab.get_sql_results in running async query (https://github.com/apache/incubator-superset/blob/b15ed5135629eddd21409ac0ca749130dac78055/superset/views/core.py#L2543)
but did not get sent in running sync query.

@youngyjd
Copy link
Contributor Author

@mistercrunch a one line fix for the bug that we discussed.

@youngyjd
Copy link
Contributor Author

@betodealmeida

@youngyjd youngyjd force-pushed the send-username-to-sql-execute-sql branch from b15ed51 to 7ac9ec1 Compare October 15, 2018 21:38
@@ -2565,7 +2565,8 @@ def sql_json(self):
data = sql_lab.get_sql_results(
query_id,
rendered_query,
return_results=True)
return_results=True,
user_name=g.user.username)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be sure, let's user_name=g.user.username if g.user else None as some environments may allow anonymous access

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it.

@mistercrunch
Copy link
Member

LGTM

@youngyjd
Copy link
Contributor Author

@mistercrunch @betodealmeida All tests passed. Can we merge this one?

@mistercrunch mistercrunch merged commit 91792a5 into apache:master Oct 16, 2018
youngyjd added a commit to lyft/incubator-superset that referenced this pull request Oct 17, 2018
* send username in sync request

* nit

(cherry picked from commit 91792a5)
youngyjd added a commit to lyft/incubator-superset that referenced this pull request Oct 17, 2018
* send username in sync request

* nit

(cherry picked from commit 91792a5)
(cherry picked from commit 7272bab)
youngyjd added a commit to lyft/incubator-superset that referenced this pull request Oct 17, 2018
* send username in sync request

* nit

(cherry picked from commit 91792a5)
(cherry picked from commit 7272bab)
youngyjd added a commit to lyft/incubator-superset that referenced this pull request Nov 2, 2018
* send username in sync request

* nit

(cherry picked from commit 91792a5)
(cherry picked from commit 7272bab)
youngyjd added a commit to lyft/incubator-superset that referenced this pull request Nov 2, 2018
* send username in sync request

* nit

(cherry picked from commit 91792a5)
(cherry picked from commit 7272bab)
bipinsoniguavus pushed a commit to ThalesGroup/incubator-superset that referenced this pull request Dec 26, 2018
* send username in sync request

* nit
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants