mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-21 14:59:47 -04:00
Fix the user flow when the user account is locked.
The user has 10 tries at the password, after which the account is locked. The same is true for the verify code, the user will have 10 tries before the user account is locked.
This commit is contained in:
@@ -32,9 +32,6 @@ def two_factor():
|
||||
# Check if coming from new password page
|
||||
if 'password' in session['user_details']:
|
||||
user = user_api_client.update_password(user.id, password=session['user_details']['password'])
|
||||
if user.is_locked():
|
||||
form.sms_code.errors.append('Code not found')
|
||||
return render_template('views/two-factor.html', form=form)
|
||||
activated_user = user_api_client.activate_user(user)
|
||||
login_user(activated_user, remember=True)
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user