Skip to content

Commit

Permalink
Adding a note to run init script in installation process
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Oct 13, 2015
1 parent 179622d commit b25393b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -75,6 +75,9 @@ fabmanager create-admin --app panoramix
# Initialize the database
panoramix db upgrade
# Create default roles and permissions
panoramix init
# Load some data to play with
panoramix load_examples
Expand Down
2 changes: 2 additions & 0 deletions panoramix/utils.py
Expand Up @@ -127,6 +127,7 @@ def init():
from flask_appbuilder.security.sqla import models as ab_models
sm = appbuilder.sm
alpha = sm.add_role("Alpha")
admin = sm.add_role("Admin")

merge_perm(sm, 'all_datasource_access', 'all_datasource_access')

Expand All @@ -136,6 +137,7 @@ def init():
'UserDBModelView', 'RoleModelView', 'ResetPasswordView',
'Security'):
sm.add_permission_role(alpha, perm)
sm.add_permission_role(admin, perm)
gamma = sm.add_role("Gamma")
for perm in perms:
s = perm.permission.name
Expand Down

0 comments on commit b25393b

Please sign in to comment.