From 0e00412ddadb7d2df43a4bed78360465c7f4ccaf Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 28 Mar 2017 04:18:22 +0000 Subject: [PATCH] Fixing out-of-sync security --- superset/security.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset/security.py b/superset/security.py index 435f23d4634fe..bc7e1095077eb 100644 --- a/superset/security.py +++ b/superset/security.py @@ -94,7 +94,6 @@ def get_or_create_main_db(): ) if not dbobj: dbobj = models.Database(database_name="main") - logging.info(conf.get("SQLALCHEMY_DATABASE_URI")) dbobj.set_sqlalchemy_uri(conf.get("SQLALCHEMY_DATABASE_URI")) dbobj.expose_in_sqllab = True dbobj.allow_run_sync = True @@ -147,6 +146,9 @@ def set_role(role_name, pvms, pvm_check): role = sm.add_role(role_name) role_pvms = [p for p in pvms if pvm_check(p)] role.permissions = role_pvms + sesh = sm.get_session() + sesh.merge(role) + sesh.commit() def create_custom_permissions():