superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] 02/08: [FAB] set AppBuilder to update_perms=False (#7561)
Date Wed, 19 Jun 2019 22:36:09 GMT
This is an automated email from the ASF dual-hosted git repository.

michellet pushed a commit to branch release--0.33
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit c253f8964a145afc4d71cbec497319fa03265ce4
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Sat Jun 1 10:19:49 2019 -0700

    [FAB] set AppBuilder to update_perms=False (#7561)
    
    * [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
    https://github.com/apache/incubator-superset/pull/7323
    
    * Add superset init to tox
    
    (cherry picked from commit eb4293654e8557a208a7a08b71ab22163c428362)
---
 superset/__init__.py | 1 +
 tox.ini              | 1 +
 2 files changed, 2 insertions(+)

diff --git a/superset/__init__.py b/superset/__init__.py
index 6971dc9..d03f28e 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -203,6 +203,7 @@ with app.app_context():
         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
diff --git a/tox.ini b/tox.ini
index 5eb9db5..5cb4eb7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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 =


Mime
View raw message