Skip to content

Commit

Permalink
Definining a Gamma role
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Oct 4, 2015
1 parent c2049f8 commit 45b5950
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion panoramix/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,20 @@ def init():
'UserDBModelView', 'RoleModelView', 'ResetPasswordView',
'Security'):
sm.add_permission_role(alpha, perm)
sm.add_role("Gamma")
gamma = sm.add_role("Gamma")
for perm in perms:
s = perm.permission.name
if(
perm.view_menu.name not in (
'UserDBModelView',
'RoleModelView',
'ResetPasswordView',
'Security') and
perm.permission.name not in (
'can_edit',
'can_add',
'can_save',
'can_download',
'muldelete',
)):
sm.add_permission_role(gamma, perm)

0 comments on commit 45b5950

Please sign in to comment.