Skip to content

Commit

Permalink
[FAB] set AppBuilder to update_perms=False (#7561)
Browse files Browse the repository at this point in the history
* [FAB] set AppBuilder to update_perms=False

Upon start, by default, FAB tries to go and update the permission list
in the database based on the list of views, models and menu items that
exist in the code.

Really this should happen once per deployment/upgrade and
not in module scope, so we have `superset init` for this.

The intent was always to set to False by default, but I think we forgot
to add this flag back in
#7323

* Add superset init to tox

(cherry picked from commit eb42936)
  • Loading branch information
mistercrunch authored and michellethomas committed Jun 19, 2019
1 parent 7bdc3dd commit c253f89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions superset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def index(self):
base_template='superset/base.html',
indexview=MyIndexView,
security_manager_class=custom_sm,
update_perms=False, # Run `superset init` to update FAB's perms
)

security_manager = appbuilder.sm
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ require-code = true
[testenv]
commands =
{toxinidir}/superset/bin/superset db upgrade
{toxinidir}/superset/bin/superset init
nosetests tests/load_examples_test.py
nosetests -e load_examples_test {posargs}
deps =
Expand Down

0 comments on commit c253f89

Please sign in to comment.