Extract user utility code into own module

This provides more room for expansion, and reduces the amount of
arbitrary code in the __init__.py file for the new package.
This commit is contained in:
Ben Thorner
2021-06-09 13:19:05 +01:00
parent 3f55c746aa
commit 7c27646d6a
34 changed files with 108 additions and 105 deletions

View File

@@ -10,11 +10,8 @@ from app.main.views.two_factor import log_in_user
from app.models.user import User
from app.models.webauthn_credential import RegistrationError, WebAuthnCredential
from app.notify_client.user_api_client import user_api_client
from app.utils import (
is_less_than_days_ago,
redirect_to_sign_in,
user_is_platform_admin,
)
from app.utils import is_less_than_days_ago, redirect_to_sign_in
from app.utils.user import user_is_platform_admin
@main.route('/webauthn/register')