Remove unnecessary restriction for 2FA WebAuthn

It should be enough to check the user has it set as their auth type.
Even if a user is no longer eligible to register a security key, it
should still be OK for them to continue using the feature.
This commit is contained in:
Ben Thorner
2021-06-30 14:54:20 +01:00
parent aad017a184
commit 7fafc18fb3
2 changed files with 1 additions and 16 deletions

View File

@@ -93,8 +93,7 @@ def two_factor_sms():
def two_factor_webauthn():
user_id = session['user_details']['id']
user = User.from_id(user_id)
if not user.platform_admin:
abort(403)
if not user.webauthn_auth:
abort(403)