Merge pull request #6922 from jumpserver/pr@dev@fix_tokensmsoptions

fix: 修复KoKo登录时,未开启SMS服务出现了SMS选项的问题
pull/6927/head
老广 2021-09-22 11:24:03 +08:00 committed by GitHub
commit d144e7e572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -537,7 +537,7 @@ class MFAMixin:
methods = []
if self.otp_secret_key:
methods.append(MFAType.OTP)
if self.phone:
if settings.XPACK_ENABLED and settings.SMS_ENABLED and self.phone:
methods.append(MFAType.SMS_CODE)
return methods