From 0bfd9cb7e0ba942053cf3899b2e73f340161629c Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 3 Jun 2019 15:21:49 +0100 Subject: Automatically logout users This accompanies the new task assignment strategy. By logging users out, we have a chance of assigning them new tasks when they login again. If they would never be logged out, it wouldn't be straightforward to decide when to assign them new tasks. --- app/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/__init__.py') diff --git a/app/__init__.py b/app/__init__.py index 864de2b..01e3267 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -65,6 +65,12 @@ def create_app(config_class=Config): app.register_blueprint(admin_bp) + # Register the auto_logout function + from app.auth.routes import auto_logout + + app.before_request(auto_logout) + + if not app.debug: if app.config["MAIL_SERVER"]: auth = None -- cgit v1.2.3