aboutsummaryrefslogtreecommitdiff
path: root/app/main
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-13 17:37:12 -0400
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-13 17:37:12 -0400
commit3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1 (patch)
treea4b43781d68bea51e7b981f31bd326083028b918 /app/main
parentadd support for user filtering (diff)
downloadAnnotateChange-3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1.tar.gz
AnnotateChange-3e5cc1850d30a41d65a0712f4f42c97dc8eea1e1.zip
Ensure user is confirmed before accessing index
Diffstat (limited to 'app/main')
-rw-r--r--app/main/routes.py2
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()