fix: OTP_IN_RADIUS 与 mfa 冲突

This commit is contained in:
xinwen
2021-09-13 15:57:04 +08:00
committed by Jiangjie.Bai
parent fc8181b5ed
commit 09d51fd5be
2 changed files with 6 additions and 1 deletions

View File

@@ -346,6 +346,10 @@ class AuthMixin(PasswordEncryptionViewMixin):
def check_user_mfa_if_need(self, user):
if self.request.session.get('auth_mfa'):
return
if settings.OTP_IN_RADIUS:
return
if not user.mfa_enabled:
return
unset, url = user.mfa_enabled_but_not_set()