mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 00:50:40 +00:00
A lot of database changes and add options to change notification level
This commit is contained in:
@ -17,10 +17,13 @@ def before_request():
|
||||
Checks if a user is unconfirmed when visiting specific sites. Redirects to
|
||||
unconfirmed view if user is unconfirmed.
|
||||
"""
|
||||
if (current_user.is_authenticated and not current_user.confirmed
|
||||
and request.blueprint != 'auth'
|
||||
and request.endpoint != 'static'):
|
||||
return redirect(url_for('auth.unconfirmed'))
|
||||
if current_user.is_authenticated:
|
||||
current_user.ping()
|
||||
if not current_user.confirmed \
|
||||
and request.endpoint \
|
||||
and request.blueprint != 'auth' \
|
||||
and request.endpoint != 'static':
|
||||
return redirect(url_for('auth.unconfirmed'))
|
||||
|
||||
|
||||
@auth.route('/login', methods=['GET', 'POST'])
|
||||
|
Reference in New Issue
Block a user