fix: Disable passkey mfa in safe mode

This commit is contained in:
wangruidong 2025-08-19 18:15:50 +08:00 committed by 老广
parent 0c612648a0
commit 8c0cd20b48

View File

@ -19,6 +19,8 @@ class MFAPasskey(BaseMFA):
def is_active(self): def is_active(self):
if not self.is_authenticated(): if not self.is_authenticated():
return True return True
if settings.SAFE_MODE:
return False
return self.user.passkey_set.count() return self.user.passkey_set.count()
@staticmethod @staticmethod