aboutsummaryrefslogtreecommitdiff
path: root/app/decorators.py
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-30 13:29:31 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-30 13:29:31 +0100
commitda15e439e64c8314825ad5f28073fbcbd436946f (patch)
tree62b40c9be838316fc1c0e1a5372d7bf8fbdc496b /app/decorators.py
parentAdd database migration for cp_index (diff)
downloadAnnotateChange-da15e439e64c8314825ad5f28073fbcbd436946f.tar.gz
AnnotateChange-da15e439e64c8314825ad5f28073fbcbd436946f.zip
Initial version of demo
This commit introduces the demo functionality. The task assignment has been removed at the moment, as this will be changed in a future commit.
Diffstat (limited to 'app/decorators.py')
-rw-r--r--app/decorators.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/decorators.py b/app/decorators.py
index df797bd..9fbf1f4 100644
--- a/app/decorators.py
+++ b/app/decorators.py
@@ -16,6 +16,8 @@ def admin_required(func):
return func(*args, **kwargs)
elif not current_user.is_authenticated:
return current_app.login_manager.unauthorized()
+ elif not current_user.is_confirmed:
+ return redirect(url_for("auth.not_confirmed"))
elif not current_user.is_admin:
return current_app.login_manager.unauthorized()
return func(*args, **kwargs)