fix: user confirm bug

pull/8417/head
feng626 2022-06-16 11:28:34 +08:00 committed by Jiangjie.Bai
parent 4c2274b14e
commit 75a72fb182
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ class ConfirmViewSet(ListCreateAPIView):
def check(self, confirm_type: str):
if confirm_type == ConfirmType.MFA:
return bool(MFAOtp(self.user).is_active())
return self.user.mfa_enabled
if confirm_type == ConfirmType.PASSWORD:
return self.user.is_password_authenticate()