fix: 如配置SECURITY_VIEW_AUTH_NEED_MFA 跳过校验

pull/8622/head
feng626 2 years ago committed by Jiangjie.Bai
parent cc2b858769
commit 358460e7f0

@ -57,6 +57,9 @@ class UserConfirmation(permissions.BasePermission):
confirm_type = ConfirmType.ReLogin confirm_type = ConfirmType.ReLogin
def has_permission(self, request, view): def has_permission(self, request, view):
if not settings.SECURITY_VIEW_AUTH_NEED_MFA:
return True
confirm_level = request.session.get('CONFIRM_LEVEL') confirm_level = request.session.get('CONFIRM_LEVEL')
confirm_time = request.session.get('CONFIRM_TIME') confirm_time = request.session.get('CONFIRM_TIME')

Loading…
Cancel
Save