mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
731 B
24 lines
731 B
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') |
|
|
|
|
|
class PhoneNotSet(JMSException): |
|
default_code = 'phone_not_set' |
|
default_detail = _('Phone not set') |
|
|
|
|
|
class UnableToDeleteAllUsers(JMSException): |
|
default_code = 'unable_to_delete_all_users' |
|
default_detail = _('Unable to delete all users') |
|
|
|
|
|
class CreateSSHKeyExceedLimit(JMSException): |
|
default_code = 'create_ssh_key_exceed_limit' |
|
default_detail = _('Create failed. The number of SSH keys has reached the limit')
|
|
|