Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing perms to sql_lab role #4714

Merged
merged 1 commit into from
Mar 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions superset/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,14 @@ def is_gamma_pvm(self, pvm):
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 {
Expand Down