Skip to content

Commit

Permalink
Fixing out-of-sync security (#2493)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Mar 28, 2017
1 parent c301558 commit 5574cfe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 5574cfe

Please sign in to comment.