Merge pull request #6923 from jumpserver/pr@v2.14@fix_tokensmsoptions

fix: 修复KoKo登录时,未开启SMS服务出现了SMS选项的问题
pull/6928/head
老广 2021-09-22 11:23:42 +08:00 committed by GitHub
commit 93b5876469
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