diff options
author | Frederick Muriuki Muriithi | 2024-05-13 06:33:51 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-05-13 06:33:51 +0300 |
commit | 2a25cce03405d23a19f984586aab3dd341912fd5 (patch) | |
tree | 7efc066acaa8ca61bf6379a2a3c4b2afec24bd3c /gn_auth/auth/authorisation | |
parent | a22dbcba7b28b75c13aa25bdd36583ade5fe3747 (diff) | |
download | gn-auth-2a25cce03405d23a19f984586aab3dd341912fd5.tar.gz |
Fix myriad of linting error
These linting errors can't be rebased into the newer commits.
Diffstat (limited to 'gn_auth/auth/authorisation')
-rw-r--r-- | gn_auth/auth/authorisation/users/admin/views.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gn_auth/auth/authorisation/users/admin/views.py b/gn_auth/auth/authorisation/users/admin/views.py index f004027..73e808a 100644 --- a/gn_auth/auth/authorisation/users/admin/views.py +++ b/gn_auth/auth/authorisation/users/admin/views.py @@ -18,7 +18,6 @@ from flask import ( url_for, redirect, Blueprint, - current_app, render_template, current_app as app) @@ -91,7 +90,7 @@ def login(): email = validate_email(form.get("email", "").strip(), check_deliverability=False) password = form.get("password") - with db.connection(current_app.config["AUTH_DB"]) as conn: + with db.connection(app.config["AUTH_DB"]) as conn: user = user_by_email(conn, email["email"]) if valid_login(conn, user, password): session.update_session_info( @@ -195,7 +194,7 @@ def register_client(): if request.method == "GET": return render_template( "admin/register-client.html", - scope=current_app.config["OAUTH2_SCOPE"], + scope=app.config["OAUTH2_SCOPE"], users=with_db_connection(__list_users__), granttypes=_FORM_GRANT_TYPES_, current_user=session.session_user()) @@ -259,7 +258,7 @@ def view_client(client_id: uuid.UUID): return render_template( "admin/view-oauth2-client.html", client=with_db_connection(partial(oauth2_client, client_id=client_id)), - scope=current_app.config["OAUTH2_SCOPE"], + scope=app.config["OAUTH2_SCOPE"], granttypes=_FORM_GRANT_TYPES_) @admin.route("/register-client-public-key", methods=["POST"]) @@ -358,7 +357,7 @@ def delete_client_public_key(): client_metadata={ **_client.client_metadata, "public_keys": list(set( - keysdir.joinpath(f"{_key.thumbprint()}.pem") + _keysdir.joinpath(f"{_key.thumbprint()}.pem") for _key in _keys))}, user=_client.user))) flash("Key deleted.", "alert-success") |