mirror of https://github.com/jumpserver/jumpserver
perf: 修改用户登录 ACL 翻译信息
parent
306f078a09
commit
99a6d7b0ab
|
@ -138,11 +138,11 @@ class ACLError(AuthFailedNeedLogMixin, AuthFailedError):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class LoginACLNotAllowed(ACLError):
|
class LoginACLIPAndTimePeriodNotAllowed(ACLError):
|
||||||
def __init__(self, username, request, **kwargs):
|
def __init__(self, username, request, **kwargs):
|
||||||
self.username = username
|
self.username = username
|
||||||
self.request = request
|
self.request = request
|
||||||
super().__init__(_("ACL is not allowed"), **kwargs)
|
super().__init__(_("Current IP and Time period is not allowed"), **kwargs)
|
||||||
|
|
||||||
|
|
||||||
class MFACodeRequiredError(AuthFailedError):
|
class MFACodeRequiredError(AuthFailedError):
|
||||||
|
|
|
@ -337,7 +337,7 @@ class AuthACLMixin:
|
||||||
return
|
return
|
||||||
|
|
||||||
if acl.is_action(acl.ActionChoices.reject):
|
if acl.is_action(acl.ActionChoices.reject):
|
||||||
raise errors.LoginACLNotAllowed(username=user.username, request=self.request)
|
raise errors.LoginACLIPAndTimePeriodNotAllowed(username=user.username, request=self.request)
|
||||||
|
|
||||||
if acl.is_action(acl.ActionChoices.confirm):
|
if acl.is_action(acl.ActionChoices.confirm):
|
||||||
self.request.session['auth_confirm_required'] = '1'
|
self.request.session['auth_confirm_required'] = '1'
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-07-29 11:26+0800\n"
|
"POT-Creation-Date: 2022-08-02 14:32+0800\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -1914,7 +1914,7 @@ msgstr "このアカウントは期限切れです"
|
||||||
msgid "Auth backend not match"
|
msgid "Auth backend not match"
|
||||||
msgstr "Authバックエンドが一致しない"
|
msgstr "Authバックエンドが一致しない"
|
||||||
|
|
||||||
#: authentication/errors/const.py:28 authentication/errors/failed.py:145
|
#: authentication/errors/const.py:28
|
||||||
msgid "ACL is not allowed"
|
msgid "ACL is not allowed"
|
||||||
msgstr "ACLは許可されません"
|
msgstr "ACLは許可されません"
|
||||||
|
|
||||||
|
@ -1982,6 +1982,10 @@ msgstr "受け入れのためのログイン確認チケットを待つ"
|
||||||
msgid "Login confirm ticket was {}"
|
msgid "Login confirm ticket was {}"
|
||||||
msgstr "ログイン確認チケットは {} でした"
|
msgstr "ログイン確認チケットは {} でした"
|
||||||
|
|
||||||
|
#: authentication/errors/failed.py:145
|
||||||
|
msgid "Current IP and Time period is not allowed"
|
||||||
|
msgstr "現在の IP と期間はログインを許可されていません"
|
||||||
|
|
||||||
#: authentication/errors/failed.py:150
|
#: authentication/errors/failed.py:150
|
||||||
msgid "Please enter MFA code"
|
msgid "Please enter MFA code"
|
||||||
msgstr "MFAコードを入力してください"
|
msgstr "MFAコードを入力してください"
|
||||||
|
@ -6848,8 +6852,5 @@ msgstr "コミュニティ版"
|
||||||
#~ msgid "IP is not allowed"
|
#~ msgid "IP is not allowed"
|
||||||
#~ msgstr "IPは許可されていません"
|
#~ msgstr "IPは許可されていません"
|
||||||
|
|
||||||
#~ msgid "Time Period is not allowed"
|
|
||||||
#~ msgstr "期間は許可されていません"
|
|
||||||
|
|
||||||
#~ msgid "User cannot self-update fields: {}"
|
#~ msgid "User cannot self-update fields: {}"
|
||||||
#~ msgstr "ユーザーは自分のフィールドを更新できません: {}"
|
#~ msgstr "ユーザーは自分のフィールドを更新できません: {}"
|
||||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: JumpServer 0.3.3\n"
|
"Project-Id-Version: JumpServer 0.3.3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-07-29 11:26+0800\n"
|
"POT-Creation-Date: 2022-08-02 14:32+0800\n"
|
||||||
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
||||||
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
||||||
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
||||||
|
@ -1900,7 +1900,7 @@ msgstr "此账号已过期"
|
||||||
msgid "Auth backend not match"
|
msgid "Auth backend not match"
|
||||||
msgstr "没有匹配到认证后端"
|
msgstr "没有匹配到认证后端"
|
||||||
|
|
||||||
#: authentication/errors/const.py:28 authentication/errors/failed.py:145
|
#: authentication/errors/const.py:28
|
||||||
msgid "ACL is not allowed"
|
msgid "ACL is not allowed"
|
||||||
msgstr "ACL 不被允许"
|
msgstr "ACL 不被允许"
|
||||||
|
|
||||||
|
@ -1962,6 +1962,10 @@ msgstr "等待登录复核处理"
|
||||||
msgid "Login confirm ticket was {}"
|
msgid "Login confirm ticket was {}"
|
||||||
msgstr "登录复核: {}"
|
msgstr "登录复核: {}"
|
||||||
|
|
||||||
|
#: authentication/errors/failed.py:145
|
||||||
|
msgid "Current IP and Time period is not allowed"
|
||||||
|
msgstr "当前 IP 和时间段不被允许登录"
|
||||||
|
|
||||||
#: authentication/errors/failed.py:150
|
#: authentication/errors/failed.py:150
|
||||||
msgid "Please enter MFA code"
|
msgid "Please enter MFA code"
|
||||||
msgstr "请输入 MFA 验证码"
|
msgstr "请输入 MFA 验证码"
|
||||||
|
@ -6751,8 +6755,5 @@ msgstr "社区版"
|
||||||
#~ msgid "IP is not allowed"
|
#~ msgid "IP is not allowed"
|
||||||
#~ msgstr "来源 IP 不被允许登录"
|
#~ msgstr "来源 IP 不被允许登录"
|
||||||
|
|
||||||
#~ msgid "Time Period is not allowed"
|
|
||||||
#~ msgstr "该 时间段 不被允许登录"
|
|
||||||
|
|
||||||
#~ msgid "User cannot self-update fields: {}"
|
#~ msgid "User cannot self-update fields: {}"
|
||||||
#~ msgstr "用户不能更新自己的字段: {}"
|
#~ msgstr "用户不能更新自己的字段: {}"
|
||||||
|
|
Loading…
Reference in New Issue