diff options
author | Vincent Post <cent@spline.de> | 2020-08-07 21:38:54 +0200 |
---|---|---|
committer | Jonah BrĂ¼chert <jbb@kaidan.im> | 2023-05-22 00:28:13 +0200 |
commit | acfbdbf7bb9f6f1105d464f3e6080c33330736ff (patch) | |
tree | f319c5e050a79dd6754fb09985f7b6263a339163 /accounts/views | |
parent | b21b940a3ded4bc5eb664a6b787d1f0fbbc7cc88 (diff) | |
download | web-acfbdbf7bb9f6f1105d464f3e6080c33330736ff.tar.gz web-acfbdbf7bb9f6f1105d464f3e6080c33330736ff.tar.bz2 web-acfbdbf7bb9f6f1105d464f3e6080c33330736ff.zip |
Updated Flask-Login => is_authenticated is not a method anymore
Diffstat (limited to 'accounts/views')
-rw-r--r-- | accounts/views/admin/__init__.py | 2 | ||||
-rw-r--r-- | accounts/views/login/__init__.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/accounts/views/admin/__init__.py b/accounts/views/admin/__init__.py index 66de7c3..35fda58 100644 --- a/accounts/views/admin/__init__.py +++ b/accounts/views/admin/__init__.py @@ -16,7 +16,7 @@ bp = Blueprint('admin', __name__) @bp.before_request def restrict_bp_to_admins(): - if not current_user.is_authenticated(): + if not current_user.is_authenticated: return current_app.login_manager.unauthorized() if current_user.uid not in current_app.config.get('ADMIN_USERS', []): raise Forbidden('Du bist kein Admin.') diff --git a/accounts/views/login/__init__.py b/accounts/views/login/__init__.py index afcc4a9..730b3ed 100644 --- a/accounts/views/login/__init__.py +++ b/accounts/views/login/__init__.py @@ -24,7 +24,7 @@ def is_safe_url(target): @bp.route('/login', methods=['GET', 'POST']) def login(): - if current_user.is_authenticated(): + if current_user.is_authenticated: return redirect(url_for('default.index')) form = LoginForm(request.form) |