mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 01:40:52 +00:00
fix: 修复禁用 MFA 后还可以用 MFA 查看密码匣子
This commit is contained in:
10
apps/users/exceptions.py
Normal file
10
apps/users/exceptions.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from rest_framework import status
|
||||
|
||||
from common.exceptions import JMSException
|
||||
|
||||
|
||||
class MFANotEnabled(JMSException):
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_code = 'mfa_not_enabled'
|
||||
default_detail = _('MFA not enabled')
|
Reference in New Issue
Block a user