disable login if user is disabled
This commit is contained in:
parent
6c37a91c6d
commit
7e425c0338
|
@ -57,6 +57,8 @@ def auth_login():
|
|||
# Trigger rate limiter
|
||||
g.deduct_limit = True
|
||||
return jsonify(error="Email or password incorrect"), 400
|
||||
elif user.disabled:
|
||||
return jsonify(error="Account disabled"), 400
|
||||
elif not user.activated:
|
||||
return jsonify(error="Account not activated"), 400
|
||||
elif user.fido_enabled():
|
||||
|
|
|
@ -36,6 +36,11 @@ def login():
|
|||
g.deduct_limit = True
|
||||
form.password.data = None
|
||||
flash("Email or password incorrect", "error")
|
||||
elif user.disabled:
|
||||
flash(
|
||||
"Your account is disabled. Please contact SimpleLogin team to re-enable your account.",
|
||||
"error",
|
||||
)
|
||||
elif not user.activated:
|
||||
show_resend_activation = True
|
||||
flash(
|
||||
|
|
Loading…
Reference in New Issue