mirror of https://github.com/jumpserver/jumpserver
parent
0aad0b7279
commit
75aacd0da6
|
@ -23,7 +23,7 @@ class NeedMoreInfoError(Exception):
|
||||||
|
|
||||||
|
|
||||||
class NeedRedirectError(JMSException):
|
class NeedRedirectError(JMSException):
|
||||||
def __init__(self, url):
|
def __init__(self, url, *args, **kwargs):
|
||||||
self.url = url
|
self.url = url
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,8 +79,7 @@ class PasswordTooSimple(NeedRedirectError):
|
||||||
default_detail = _('Your password is too simple, please change it for security')
|
default_detail = _('Your password is too simple, please change it for security')
|
||||||
|
|
||||||
def __init__(self, url, *args, **kwargs):
|
def __init__(self, url, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(url, *args, **kwargs)
|
||||||
self.url = url
|
|
||||||
|
|
||||||
|
|
||||||
class PasswordNeedUpdate(NeedRedirectError):
|
class PasswordNeedUpdate(NeedRedirectError):
|
||||||
|
@ -88,8 +87,7 @@ class PasswordNeedUpdate(NeedRedirectError):
|
||||||
default_detail = _('You should to change your password before login')
|
default_detail = _('You should to change your password before login')
|
||||||
|
|
||||||
def __init__(self, url, *args, **kwargs):
|
def __init__(self, url, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(url, *args, **kwargs)
|
||||||
self.url = url
|
|
||||||
|
|
||||||
|
|
||||||
class PasswordRequireResetError(NeedRedirectError):
|
class PasswordRequireResetError(NeedRedirectError):
|
||||||
|
@ -97,13 +95,12 @@ class PasswordRequireResetError(NeedRedirectError):
|
||||||
default_detail = _('Your password has expired, please reset before logging in')
|
default_detail = _('Your password has expired, please reset before logging in')
|
||||||
|
|
||||||
def __init__(self, url, *args, **kwargs):
|
def __init__(self, url, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(url, *args, **kwargs)
|
||||||
self.url = url
|
|
||||||
|
|
||||||
|
|
||||||
class MFAUnsetError(NeedRedirectError):
|
class MFAUnsetError(NeedRedirectError):
|
||||||
error = const.reason_mfa_unset
|
error = const.reason_mfa_unset
|
||||||
msg = const.mfa_unset_msg
|
msg = const.mfa_unset_msg
|
||||||
|
|
||||||
def __init__(self, url, user, request):
|
def __init__(self, url, *args, **kwargs):
|
||||||
self.url = url
|
super().__init__(url, *args, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue