superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grace...@apache.org
Subject [incubator-superset] branch master updated: Revert "Filter out unavailable databases (#3875)" (#3918)
Date Tue, 21 Nov 2017 20:58:49 GMT
This is an automated email from the ASF dual-hosted git repository.

graceguo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 680e1cb  Revert "Filter out unavailable databases (#3875)" (#3918)
680e1cb is described below

commit 680e1cbb42b62b2bd2aac2968f9d03547fd0b060
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Tue Nov 21 12:58:47 2017 -0800

    Revert "Filter out unavailable databases (#3875)" (#3918)
    
    This reverts commit ae2205aeb54f43b63e58aadfbb5dd749e1c98d98.
---
 superset/views/core.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index af2396e..18f6622 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -130,14 +130,6 @@ class SliceFilter(SupersetFilter):
         return query.filter(self.model.perm.in_(perms))
 
 
-class DatabaseFilter(SupersetFilter):
-    def apply(self, query, func):
-        if self.has_all_datasource_access():
-            return query
-        perms = self.get_view_menus('database_access')
-        return query.filter(self.model.perm.in_(perms))
-
-
 class DashboardFilter(SupersetFilter):
 
     """List dashboards for which users have access to at least one slice"""
@@ -211,7 +203,6 @@ class DatabaseView(SupersetModelView, DeleteMixin):  # noqa
     ]
     add_template = 'superset/models/database/add.html'
     edit_template = 'superset/models/database/edit.html'
-    base_filters = [['perm', DatabaseFilter, lambda:[]]]
     base_order = ('changed_on', 'desc')
     description_columns = {
         'sqlalchemy_uri': utils.markdown(

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message