superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Add all database access permission to 'Alpha' role (#7271)
Date Mon, 15 Apr 2019 16:23:08 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin 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 9dfa80d  Add all database access permission to 'Alpha' role (#7271)
9dfa80d is described below

commit 9dfa80d5c869f7cc522a3d2507e045370d378a15
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Mon Apr 15 09:22:54 2019 -0700

    Add all database access permission to 'Alpha' role (#7271)
    
    * Add all database access permission to 'Alpha' role
    
    * Grant all database access to Alpha
---
 superset/security.py    | 2 +-
 tests/security_tests.py | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/superset/security.py b/superset/security.py
index 3a766d4..d2208e6 100644
--- a/superset/security.py
+++ b/superset/security.py
@@ -68,7 +68,6 @@ class SupersetSecurityManager(SecurityManager):
     }
 
     ADMIN_ONLY_PERMISSIONS = {
-        'all_database_access',
         'can_sql_json',  # TODO: move can_sql_json to sql_lab role
         'can_override_role_permissions',
         'can_sync_druid_source',
@@ -84,6 +83,7 @@ class SupersetSecurityManager(SecurityManager):
 
     ALPHA_ONLY_PERMISSIONS = set([
         'muldelete',
+        'all_database_access',
         'all_datasource_access',
     ])
 
diff --git a/tests/security_tests.py b/tests/security_tests.py
index 423b58b..063f1e8 100644
--- a/tests/security_tests.py
+++ b/tests/security_tests.py
@@ -129,9 +129,6 @@ class RolePermissionTests(SupersetTestCase):
         self.assertTrue(security_manager.is_admin_only(
             security_manager.find_permission_view_menu(
                 'can_approve', 'Superset')))
-        self.assertTrue(security_manager.is_admin_only(
-            security_manager.find_permission_view_menu(
-                'all_database_access', 'all_database_access')))
 
     def test_is_alpha_only(self):
         self.assertFalse(security_manager.is_alpha_only(
@@ -148,6 +145,9 @@ class RolePermissionTests(SupersetTestCase):
         self.assertTrue(security_manager.is_alpha_only(
             security_manager.find_permission_view_menu(
                 'can_delete', 'DruidMetricInlineView')))
+        self.assertTrue(security_manager.is_alpha_only(
+            security_manager.find_permission_view_menu(
+                'all_database_access', 'all_database_access')))
 
     def test_is_gamma_pvm(self):
         self.assertTrue(security_manager.is_gamma_pvm(


Mime
View raw message