diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-05-13 17:37:12 -0400 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2019-05-13 17:37:12 -0400 |
| commit | 3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1 (patch) | |
| tree | a4b43781d68bea51e7b981f31bd326083028b918 | |
| parent | add support for user filtering (diff) | |
| download | AnnotateChange-3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1.tar.gz AnnotateChange-3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1.zip | |
Ensure user is confirmed before accessing index
| -rw-r--r-- | app/main/routes.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/main/routes.py b/app/main/routes.py index e40b971..60dd6e1 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -30,6 +30,8 @@ Thank you! @bp.route("/") @bp.route("/index") def index(): + if not current_user.is_anonymous and not current_user.is_confirmed: + return redirect(url_for("auth.not_confirmed")) if current_user.is_authenticated: user_id = current_user.id tasks = Task.query.filter_by(annotator_id=user_id).all() |
