From 3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 13 May 2019 17:37:12 -0400 Subject: Ensure user is confirmed before accessing index --- app/main/routes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/main') 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() -- cgit v1.2.3