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

Hack to check permissions on inputs to 'Query Results' data source #812

Closed
wants to merge 1 commit into from

Conversation

washort
Copy link

@washort washort commented Feb 8, 2019

This looks at the query used against the 'query results' data source, identifies the queries it targets, and checks that the user has permission to view results from those queries. If not, permission is not granted to view the output.

@washort washort requested a review from jezdez February 8, 2019 16:54
Copy link

@jezdez jezdez left a comment

Choose a reason for hiding this comment

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

Generally speaking I'm not against this type of extension, but it'd be much better to have this in redash-stmo, which I think is possible in this case. You could subclass QueryResultResource and override the get method to do the same check as you've done here. I hope we can simply re-register the updated subclass with Redash via Flask's url endpoints or if needed monkeypatch it in. What do you think?

redash/handlers/query_results.py Show resolved Hide resolved
redash/handlers/query_results.py Show resolved Hide resolved
tests/handlers/test_query_results.py Show resolved Hide resolved
@washort
Copy link
Author

washort commented Feb 13, 2019

Superseded by mozilla/redash-stmo#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants