From da15e439e64c8314825ad5f28073fbcbd436946f Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 30 May 2019 13:29:31 +0100 Subject: 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. --- app/decorators.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/decorators.py') 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) -- cgit v1.2.3