mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-02 17:52:11 +00:00
fix: sms bug
This commit is contained in:
parent
b95d3ac9be
commit
9424929dde
@ -401,9 +401,9 @@ class AuthMixin(PasswordEncryptionViewMixin):
|
||||
def check_user_mfa(self, code, mfa_type=MFAType.OTP, user=None):
|
||||
user = user if user else self.get_user_from_session()
|
||||
if not user.mfa_enabled:
|
||||
return True
|
||||
return
|
||||
|
||||
if not (bool(user.otp_secret_key) and mfa_type == MFAType.OTP):
|
||||
if not bool(user.otp_secret_key) and mfa_type == MFAType.OTP:
|
||||
self.set_passwd_verify_on_session(user)
|
||||
raise errors.OTPRequiredError(reverse_lazy('authentication:user-otp-enable-bind'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user