From 358460e7f0af98548953451fee7ba67ab979e09a Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Tue, 19 Jul 2022 16:22:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A6=82=E9=85=8D=E7=BD=AESECURITY=5FVI?= =?UTF-8?q?EW=5FAUTH=5FNEED=5FMFA=20=E8=B7=B3=E8=BF=87=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/permissions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/common/permissions.py b/apps/common/permissions.py index c2d2cf4fa..869107a58 100644 --- a/apps/common/permissions.py +++ b/apps/common/permissions.py @@ -57,6 +57,9 @@ class UserConfirmation(permissions.BasePermission): confirm_type = ConfirmType.ReLogin def has_permission(self, request, view): + if not settings.SECURITY_VIEW_AUTH_NEED_MFA: + return True + confirm_level = request.session.get('CONFIRM_LEVEL') confirm_time = request.session.get('CONFIRM_TIME')