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/11/26 17:19:03 UTC

[GitHub] pbr0ck3r commented on a change in pull request #6356: added filter on databaseView that filters databases based on access in roles

pbr0ck3r commented on a change in pull request #6356: added filter on databaseView that filters databases based on access in roles
URL: https://github.com/apache/incubator-superset/pull/6356#discussion_r236348156
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -93,6 +93,15 @@ def apply(self, query, func):  # noqa
         return query.filter(self.model.perm.in_(perms))
 
 
+class DatabaseFilter(SupersetFilter):
+    def apply(self, query, func):  # noqa
+        if security_manager.all_database_access():
+            return query
+        perms = self.get_view_menus('database_access')
+        # TODO(bogdan): add `schema_access` support here
 
 Review comment:
   Fixed!

----------------------------------------------------------------
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