Skip to content

Commit

Permalink
Admin / Alpha permission cleanup and fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Kyryliuk committed Nov 21, 2016
1 parent bd6a439 commit c308339
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
'muldelete',
'all_datasource_access',
])

READ_ONLY_PRODUCT = set(
product(READ_ONLY_PERMISSION, READ_ONLY_MODELVIEWS))

Expand Down Expand Up @@ -126,8 +127,7 @@ def sync_role_definitions():
p.view_menu.name not in ADMIN_ONLY_VIEW_MENUES and
p.permission.name not in ADMIN_ONLY_PERMISSIONS
) or
(p.permission.name, p.view_menu.name) in READ_ONLY_PRODUCT
):
(p.permission.name, p.view_menu.name) in READ_ONLY_PRODUCT):
sm.add_permission_role(alpha, p)
else:
sm.del_permission_role(alpha, p)
Expand Down

0 comments on commit c308339

Please sign in to comment.