aboutsummaryrefslogtreecommitdiff
path: root/app/__init__.py
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-06-03 15:21:49 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-06-03 15:21:49 +0100
commit0bfd9cb7e0ba942053cf3899b2e73f340161629c (patch)
tree1e0a336f9e14002efa14779572c8fe024968e95d /app/__init__.py
parentRewrite the task assignment flow (diff)
downloadAnnotateChange-0bfd9cb7e0ba942053cf3899b2e73f340161629c.tar.gz
AnnotateChange-0bfd9cb7e0ba942053cf3899b2e73f340161629c.zip
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.
Diffstat (limited to 'app/__init__.py')
-rw-r--r--app/__init__.py6
1 files changed, 6 insertions, 0 deletions
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