You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/03/29 21:24:17 UTC

[incubator-superset] branch master updated: Add missing perms to sql_lab role (#4714)

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 9ee78d1  Add missing perms to sql_lab role (#4714)
9ee78d1 is described below

commit 9ee78d16d4587c28026667cca8e266f25c138e14
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Thu Mar 29 14:24:11 2018 -0700

    Add missing perms to sql_lab role (#4714)
    
    The SQL Lab related role that is created programmatically is missing
    permissions that make SQL Lab functional.
---
 superset/security.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/superset/security.py b/superset/security.py
index 8ea91b9..e342b03 100644
--- a/superset/security.py
+++ b/superset/security.py
@@ -349,9 +349,14 @@ class SupersetSecurityManager(SecurityManager):
                     self.is_alpha_only(pvm))
 
     def is_sql_lab_pvm(self, pvm):
-        return pvm.view_menu.name in {'SQL Lab'} or pvm.permission.name in {
-            'can_sql_json', 'can_csv', 'can_search_queries',
-        }
+        return (
+            pvm.view_menu.name in {
+                'SQL Lab', 'SQL Editor', 'Query Search', 'Saved Queries',
+            } or
+            pvm.permission.name in {
+                'can_sql_json', 'can_csv', 'can_search_queries', 'can_sqllab_viz',
+                'can_sqllab',
+            })
 
     def is_granter_pvm(self, pvm):
         return pvm.permission.name in {

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.