diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-06-03 15:21:49 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-06-03 15:21:49 +0100 |
| commit | 0bfd9cb7e0ba942053cf3899b2e73f340161629c (patch) | |
| tree | 1e0a336f9e14002efa14779572c8fe024968e95d /app/__init__.py | |
| parent | Rewrite the task assignment flow (diff) | |
| download | AnnotateChange-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__.py | 6 |
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 |
