Skip to content

Commit

Permalink
Missing merge_perm function. Fixes 1691. (#1692)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Noé authored and mistercrunch committed Nov 28, 2016
1 parent 16aba51 commit e3a9b39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions superset/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
])


def merge_perm(sm, permission_name, view_menu_name):
pv = sm.find_permission_view_menu(permission_name, view_menu_name)
if not pv:
sm.add_permission_view_menu(permission_name, view_menu_name)


def is_user_defined_permission(perm):
return perm.permission.name in OBJECT_SPEC_PERMISSIONS

Expand Down

0 comments on commit e3a9b39

Please sign in to comment.