mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Missing merge_perm function. Fixes 1691. (#1692)
This commit is contained in:
committed by
Maxime Beauchemin
parent
16aba517e4
commit
e3a9b393c2
@@ -64,6 +64,12 @@ OBJECT_SPEC_PERMISSIONS = set([
|
||||
])
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user