You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/16 12:25:56 UTC
[GitHub] kalium99 commented on issue #3608: Request for a filter box with
user-level filtering capabilities.
kalium99 commented on issue #3608: Request for a filter box with user-level filtering capabilities.
URL: https://github.com/apache/incubator-superset/issues/3608#issuecomment-413528011
@ahsanshah I hear you. I am facing a similar issue.
AIUI the current permission systems are about access to dashboards, charts and data-sources. That's a level above what we want (i.e we want to have granular permissions based access to the data *within* those charts).
Here is an initial thought on how maybe superset could be patched to make this work:
1) When creating users, have a set of arbitrary key/values that you can populate for that user. It could be things like 'user_id', 'department' etc. The point here is to add key/values that we would want to later filter on.
2) When creating Charts, where the 'Add Filter' is, have an 'Add User Filter' option. This might look the same as the regular Filter option, except the value would be a key that we had previously entered as the user. It might look something like storing a bindparam for later interpolation.
3) `Table.get_sqla_query()` would then build our query just like it does now, although in addition to a `filter` key, it could also look for `user_filter` (or whatever), and would do a `getattr(flask.g.user, user_filter.val)` or similar to get the user specific value that we are filtering against.
You'd obviously have to consider what to do if the User doesn't have the attribute, as well as other possible complexities I haven't thought of.
If those who know Superset better than I think this is a reasonable approach I'd be happy to get on and write a patch, because as much as I'd like to use Superset, without this kind of feature it's of limited use to me :(
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org