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

Filter datasources per user permissions #3414

Closed

Conversation

aliavni
Copy link
Contributor

@aliavni aliavni commented Sep 5, 2017

This fixes #1434

@coveralls
Copy link

coveralls commented Sep 5, 2017

Coverage Status

Coverage decreased (-0.1%) to 69.022% when pulling a5d9aae on aliavni:filter-datasources-per-user-permissions into 3dfdde1 on apache:master.

@coveralls
Copy link

coveralls commented Sep 5, 2017

Coverage Status

Coverage increased (+0.07%) to 69.188% when pulling ae680a5 on aliavni:filter-datasources-per-user-permissions into 3dfdde1 on apache:master.

@xrmx
Copy link
Contributor

xrmx commented Sep 5, 2017

I have a vague remember we have some sorts of helpers that returns the available datasources or permissions. [after a bit...] Maybe there's something you can reuse something from BaseSupersetView.accessible_by_user?

@aliavni
Copy link
Contributor Author

aliavni commented Sep 5, 2017

@xrmx thanks for the feedback. I already checked BaseSupersetView.accessible_by_user, but it returns names (strings) rather than the datasource objects we need here. Plus, it queries individual databases rather than the tables and datasources tables of superset database. What do you think?

@coveralls
Copy link

coveralls commented Sep 5, 2017

Coverage Status

Coverage increased (+0.07%) to 69.183% when pulling 2b34502 on aliavni:filter-datasources-per-user-permissions into 3dfdde1 on apache:master.

@mistercrunch
Copy link
Member

The proper way to do this so that it applies throughout the app (CRUD, REST, ...) is this way:
https://github.com/apache/incubator-superset/blob/master/superset/views/core.py#L126

I think something similar needs to be done on top of BaseDatasource:
https://github.com/apache/incubator-superset/blob/master/superset/connectors/base/views.py#L6

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 197 days. Feel free to comment and request for this issue to be reopened.

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.

datasources are not filtered per user permissions in Slice's "Datasource & Chart Type"
4 participants