From a024f267684c1f36dc8d2ed0e514da59000be7c7 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 16 Jun 2022 10:35:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E6=8E=88=E6=9D=83=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/ja/LC_MESSAGES/django.mo | 4 +- apps/locale/ja/LC_MESSAGES/django.po | 60 ++++++++++--------- apps/locale/zh/LC_MESSAGES/django.mo | 4 +- apps/locale/zh/LC_MESSAGES/django.po | 53 ++++++++++------ .../perms/_msg_item_permissions_expire.html | 2 +- .../perms/_msg_permed_items_expire.html | 2 +- 6 files changed, 73 insertions(+), 52 deletions(-) diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index 50947cea2..d528ec14b 100644 --- a/apps/locale/ja/LC_MESSAGES/django.mo +++ b/apps/locale/ja/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a0e0ef94fd1cf5b3d41c378b54e8af2fb502c7f1e9d6a3e54084e8113978561 -size 127495 +oid sha256:f3bc03d3cc4de571f20944b3db7e9d89ffac34cd261bc9bbabc8d3d41e4157a5 +size 128122 diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po index 11310178e..d3859856a 100644 --- a/apps/locale/ja/LC_MESSAGES/django.po +++ b/apps/locale/ja/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-14 15:48+0800\n" +"POT-Creation-Date: 2022-06-16 10:20+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -665,7 +665,7 @@ msgstr "すべて" #: assets/models/backup.py:52 assets/serializers/backup.py:32 #: xpack/plugins/change_auth_plan/models/app.py:41 #: xpack/plugins/change_auth_plan/models/asset.py:62 -#: xpack/plugins/change_auth_plan/serializers/base.py:49 +#: xpack/plugins/change_auth_plan/serializers/base.py:45 msgid "Recipient" msgstr "受信者" @@ -708,7 +708,7 @@ msgstr "アカウントのバックアップスナップショット" #: assets/models/backup.py:116 assets/serializers/backup.py:40 #: xpack/plugins/change_auth_plan/models/base.py:125 -#: xpack/plugins/change_auth_plan/serializers/base.py:82 +#: xpack/plugins/change_auth_plan/serializers/base.py:78 msgid "Trigger mode" msgstr "トリガーモード" @@ -770,8 +770,8 @@ msgstr "確認済みの日付" #: xpack/plugins/change_auth_plan/models/base.py:42 #: xpack/plugins/change_auth_plan/models/base.py:121 #: xpack/plugins/change_auth_plan/models/base.py:196 -#: xpack/plugins/change_auth_plan/serializers/base.py:22 -#: xpack/plugins/change_auth_plan/serializers/base.py:77 +#: xpack/plugins/change_auth_plan/serializers/base.py:21 +#: xpack/plugins/change_auth_plan/serializers/base.py:73 #: xpack/plugins/cloud/serializers/account_attrs.py:26 msgid "Password" msgstr "パスワード" @@ -1118,12 +1118,12 @@ msgstr "アクション" #: assets/serializers/backup.py:31 ops/mixin.py:106 ops/mixin.py:147 #: settings/serializers/auth/ldap.py:65 -#: xpack/plugins/change_auth_plan/serializers/base.py:47 +#: xpack/plugins/change_auth_plan/serializers/base.py:43 msgid "Periodic perform" msgstr "定期的なパフォーマンス" #: assets/serializers/backup.py:33 -#: xpack/plugins/change_auth_plan/serializers/base.py:50 +#: xpack/plugins/change_auth_plan/serializers/base.py:46 msgid "Currently only mail sending is supported" msgstr "現在、メール送信のみがサポートされています" @@ -1248,10 +1248,18 @@ msgstr "組織名" msgid "Asset hostname" msgstr "資産ホスト名" -#: assets/serializers/utils.py:9 +#: assets/serializers/utils.py:11 msgid "Password can not contains `{{` " msgstr "パスワードには '{{' を含まない" +#: assets/serializers/utils.py:14 +msgid "Password can not contains `'` " +msgstr "パスワードには '{{' を含まない" + +#: assets/serializers/utils.py:16 +msgid "Password can not contains `\"` " +msgstr "パスワードには '{{' を含まない" + #: assets/tasks/account_connectivity.py:30 msgid "The asset {} system platform {} does not support run Ansible tasks" msgstr "" @@ -1759,8 +1767,6 @@ msgid "{ApplicationPermission} REMOVE {SystemUser}" msgstr "{ApplicationPermission} 削除 {SystemUser}" #: authentication/api/confirm.py:40 -#, fuzzy -#| msgid "Authentication failed (username or password incorrect): {}" msgid "Authentication failed password incorrect" msgstr "認証に失敗しました (ユーザー名またはパスワードが正しくありません): {}" @@ -3070,7 +3076,7 @@ msgstr "Permedアプリケーション" msgid "Application permissions is about to expire" msgstr "アプリケーション権限の有効期限が近づいています" -#: perms/notifications.py:137 +#: perms/notifications.py:138 msgid "application permissions of organization {}" msgstr "Organization {} のアプリケーション権限" @@ -3128,14 +3134,10 @@ msgstr "システムユーザーの表示" #: perms/templates/perms/_msg_item_permissions_expire.html:7 #: perms/templates/perms/_msg_permed_items_expire.html:7 -#, fuzzy, python-format -#| msgid "" -#| "\n" -#| " The following %(item_type)s will expire in %(count)s days\n" -#| " " +#, python-format msgid "" "\n" -" The following %(item_type)s will expire in %%(count)s days\n" +" The following %(item_type)s will expire in %(count)s days\n" " " msgstr "" "\n" @@ -3150,6 +3152,10 @@ msgstr "質問があったら、管理者に連絡して下さい" msgid "My applications" msgstr "私のアプリケーション" +#: perms/tree/app.py:41 +msgid "Empty" +msgstr "空" + #: perms/utils/asset/user_permission.py:620 rbac/tree.py:59 msgid "My assets" msgstr "私の資産" @@ -4292,8 +4298,6 @@ msgid "Enable database proxy" msgstr "属性マップの有効化" #: settings/serializers/terminal.py:37 -#, fuzzy -#| msgid "Enable XRDP" msgid "Enable Razor" msgstr "XRDPの有効化" @@ -4564,7 +4568,7 @@ msgstr "ホームページ" msgid "Cancel" msgstr "キャンセル" -#: templates/resource_download.html:18 templates/resource_download.html:30 +#: templates/resource_download.html:18 templates/resource_download.html:31 msgid "Client" msgstr "クライアント" @@ -4577,15 +4581,15 @@ msgstr "" "るために使用されており、現在はRDP SSHクライアントのみをサポートしています。" "「Telnetは将来的にサポートする" -#: templates/resource_download.html:30 +#: templates/resource_download.html:31 msgid "Microsoft" msgstr "マイクロソフト" -#: templates/resource_download.html:30 +#: templates/resource_download.html:31 msgid "Official" msgstr "公式" -#: templates/resource_download.html:32 +#: templates/resource_download.html:33 msgid "" "macOS needs to download the client to connect RDP asset, which comes with " "Windows" @@ -4593,11 +4597,11 @@ msgstr "" "MacOSは、Windowsに付属のRDPアセットを接続するためにクライアントをダウンロード" "する必要があります" -#: templates/resource_download.html:41 +#: templates/resource_download.html:42 msgid "Windows Remote application publisher tools" msgstr "Windowsリモートアプリケーション発行者ツール" -#: templates/resource_download.html:42 +#: templates/resource_download.html:43 msgid "" "Jmservisor is the program used to pull up remote applications in Windows " "Remote Application publisher" @@ -6281,15 +6285,15 @@ msgstr "パスワードの変更" msgid "Change SSH Key" msgstr "SSHキーの変更" -#: xpack/plugins/change_auth_plan/serializers/base.py:48 +#: xpack/plugins/change_auth_plan/serializers/base.py:44 msgid "Run times" msgstr "実行時間" -#: xpack/plugins/change_auth_plan/serializers/base.py:62 +#: xpack/plugins/change_auth_plan/serializers/base.py:58 msgid "* Please enter the correct password length" msgstr "* 正しいパスワードの長さを入力してください" -#: xpack/plugins/change_auth_plan/serializers/base.py:65 +#: xpack/plugins/change_auth_plan/serializers/base.py:61 msgid "* Password length range 6-30 bits" msgstr "* パスワードの長さの範囲6-30ビット" diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index e5b16f047..80cdf63bd 100644 --- a/apps/locale/zh/LC_MESSAGES/django.mo +++ b/apps/locale/zh/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ab23fa4d87b928318281150ff64d9c2e3782a9169a3c3e6907808b1be63dbc3 -size 105365 +oid sha256:db8f93ff4f52dd61dd019fa9f615eb0bef6cfcf6fc0db01a08db7e2f86ca8c82 +size 105699 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 634bea865..c0ce1706c 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-14 15:48+0800\n" +"POT-Creation-Date: 2022-06-16 10:20+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -660,7 +660,7 @@ msgstr "全部" #: assets/models/backup.py:52 assets/serializers/backup.py:32 #: xpack/plugins/change_auth_plan/models/app.py:41 #: xpack/plugins/change_auth_plan/models/asset.py:62 -#: xpack/plugins/change_auth_plan/serializers/base.py:49 +#: xpack/plugins/change_auth_plan/serializers/base.py:45 msgid "Recipient" msgstr "收件人" @@ -703,7 +703,7 @@ msgstr "账号备份快照" #: assets/models/backup.py:116 assets/serializers/backup.py:40 #: xpack/plugins/change_auth_plan/models/base.py:125 -#: xpack/plugins/change_auth_plan/serializers/base.py:82 +#: xpack/plugins/change_auth_plan/serializers/base.py:78 msgid "Trigger mode" msgstr "触发模式" @@ -765,8 +765,8 @@ msgstr "校验日期" #: xpack/plugins/change_auth_plan/models/base.py:42 #: xpack/plugins/change_auth_plan/models/base.py:121 #: xpack/plugins/change_auth_plan/models/base.py:196 -#: xpack/plugins/change_auth_plan/serializers/base.py:22 -#: xpack/plugins/change_auth_plan/serializers/base.py:77 +#: xpack/plugins/change_auth_plan/serializers/base.py:21 +#: xpack/plugins/change_auth_plan/serializers/base.py:73 #: xpack/plugins/cloud/serializers/account_attrs.py:26 msgid "Password" msgstr "密码" @@ -1110,12 +1110,12 @@ msgstr "动作" #: assets/serializers/backup.py:31 ops/mixin.py:106 ops/mixin.py:147 #: settings/serializers/auth/ldap.py:65 -#: xpack/plugins/change_auth_plan/serializers/base.py:47 +#: xpack/plugins/change_auth_plan/serializers/base.py:43 msgid "Periodic perform" msgstr "定时执行" #: assets/serializers/backup.py:33 -#: xpack/plugins/change_auth_plan/serializers/base.py:50 +#: xpack/plugins/change_auth_plan/serializers/base.py:46 msgid "Currently only mail sending is supported" msgstr "当前只支持邮件发送" @@ -1240,10 +1240,22 @@ msgstr "组织名称" msgid "Asset hostname" msgstr "资产主机名" -#: assets/serializers/utils.py:9 +#: assets/serializers/utils.py:11 msgid "Password can not contains `{{` " msgstr "密码不能包含 `{{` 字符" +#: assets/serializers/utils.py:14 +#, fuzzy +#| msgid "Password can not contains `{{` " +msgid "Password can not contains `'` " +msgstr "密码不能包含 `{{` 字符" + +#: assets/serializers/utils.py:16 +#, fuzzy +#| msgid "Password can not contains `{{` " +msgid "Password can not contains `\"` " +msgstr "密码不能包含 `{{` 字符" + #: assets/tasks/account_connectivity.py:30 msgid "The asset {} system platform {} does not support run Ansible tasks" msgstr "资产 {} 系统平台 {} 不支持运行 Ansible 任务" @@ -3032,7 +3044,7 @@ msgstr "授权的应用" msgid "Application permissions is about to expire" msgstr "应用授权规则即将过期" -#: perms/notifications.py:137 +#: perms/notifications.py:138 msgid "application permissions of organization {}" msgstr "组织 ({}) 的应用授权" @@ -3088,6 +3100,7 @@ msgstr "系统用户名称" #: perms/templates/perms/_msg_item_permissions_expire.html:7 #: perms/templates/perms/_msg_permed_items_expire.html:7 +#, python-format msgid "" "\n" " The following %(item_type)s will expire in %(count)s days\n" @@ -3105,6 +3118,10 @@ msgstr "如果有疑问或需求,请联系系统管理员" msgid "My applications" msgstr "我的应用" +#: perms/tree/app.py:41 +msgid "Empty" +msgstr "空" + #: perms/utils/asset/user_permission.py:620 rbac/tree.py:59 msgid "My assets" msgstr "我的资产" @@ -4488,7 +4505,7 @@ msgstr "首页" msgid "Cancel" msgstr "取消" -#: templates/resource_download.html:18 templates/resource_download.html:30 +#: templates/resource_download.html:18 templates/resource_download.html:31 msgid "Client" msgstr "客户端" @@ -4500,25 +4517,25 @@ msgstr "" "JumpServer 客户端,目前用来唤起 特定客户端程序 连接资产, 目前仅支持 RDP SSH " "客户端,Telnet 会在未来支持" -#: templates/resource_download.html:30 +#: templates/resource_download.html:31 msgid "Microsoft" msgstr "微软" -#: templates/resource_download.html:30 +#: templates/resource_download.html:31 msgid "Official" msgstr "官方" -#: templates/resource_download.html:32 +#: templates/resource_download.html:33 msgid "" "macOS needs to download the client to connect RDP asset, which comes with " "Windows" msgstr "macOS 需要下载客户端来连接 RDP 资产,Windows 系统默认安装了该程序" -#: templates/resource_download.html:41 +#: templates/resource_download.html:42 msgid "Windows Remote application publisher tools" msgstr "Windows 远程应用发布服务器工具" -#: templates/resource_download.html:42 +#: templates/resource_download.html:43 msgid "" "Jmservisor is the program used to pull up remote applications in Windows " "Remote Application publisher" @@ -6181,15 +6198,15 @@ msgstr "更改密码" msgid "Change SSH Key" msgstr "修改 SSH Key" -#: xpack/plugins/change_auth_plan/serializers/base.py:48 +#: xpack/plugins/change_auth_plan/serializers/base.py:44 msgid "Run times" msgstr "执行次数" -#: xpack/plugins/change_auth_plan/serializers/base.py:62 +#: xpack/plugins/change_auth_plan/serializers/base.py:58 msgid "* Please enter the correct password length" msgstr "* 请输入正确的密码长度" -#: xpack/plugins/change_auth_plan/serializers/base.py:65 +#: xpack/plugins/change_auth_plan/serializers/base.py:61 msgid "* Password length range 6-30 bits" msgstr "* 密码长度范围 6-30 位" diff --git a/apps/perms/templates/perms/_msg_item_permissions_expire.html b/apps/perms/templates/perms/_msg_item_permissions_expire.html index aab2a3650..9a9dc8244 100644 --- a/apps/perms/templates/perms/_msg_item_permissions_expire.html +++ b/apps/perms/templates/perms/_msg_item_permissions_expire.html @@ -5,7 +5,7 @@

{% blocktranslate %} - The following {{ item_type }} will expire in %(count)s days + The following {{ item_type }} will expire in {{ count }} days {% endblocktranslate %}

diff --git a/apps/perms/templates/perms/_msg_permed_items_expire.html b/apps/perms/templates/perms/_msg_permed_items_expire.html index 1e5ae7b18..f4229b7eb 100644 --- a/apps/perms/templates/perms/_msg_permed_items_expire.html +++ b/apps/perms/templates/perms/_msg_permed_items_expire.html @@ -5,7 +5,7 @@

{% blocktranslate %} - The following {{ item_type }} will expire in %(count)s days + The following {{ item_type }} will expire in {{ count }} days {% endblocktranslate %}

From 4c2274b14e7873bb84d326d4210970ddac15f27f Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Thu, 16 Jun 2022 11:18:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/ja/LC_MESSAGES/django.mo | 4 ++-- apps/locale/ja/LC_MESSAGES/django.po | 22 +++------------------- apps/locale/zh/LC_MESSAGES/django.mo | 4 ++-- apps/locale/zh/LC_MESSAGES/django.po | 24 +++--------------------- 4 files changed, 10 insertions(+), 44 deletions(-) diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index d528ec14b..4618d1b80 100644 --- a/apps/locale/ja/LC_MESSAGES/django.mo +++ b/apps/locale/ja/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3bc03d3cc4de571f20944b3db7e9d89ffac34cd261bc9bbabc8d3d41e4157a5 -size 128122 +oid sha256:449dcbd8e4b4f133d45e01642bb42a20477b09309d2b916f1aff9e854e6864e8 +size 128120 diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po index d3859856a..c79aac704 100644 --- a/apps/locale/ja/LC_MESSAGES/django.po +++ b/apps/locale/ja/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-16 10:20+0800\n" +"POT-Creation-Date: 2022-06-16 11:12+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1254,11 +1254,11 @@ msgstr "パスワードには '{{' を含まない" #: assets/serializers/utils.py:14 msgid "Password can not contains `'` " -msgstr "パスワードには '{{' を含まない" +msgstr "パスワードには `'` を含まない" #: assets/serializers/utils.py:16 msgid "Password can not contains `\"` " -msgstr "パスワードには '{{' を含まない" +msgstr "パスワードには `\"` を含まない" #: assets/tasks/account_connectivity.py:30 msgid "The asset {} system platform {} does not support run Ansible tasks" @@ -6843,19 +6843,3 @@ msgstr "究極のエディション" #: xpack/plugins/license/models.py:77 msgid "Community edition" msgstr "コミュニティ版" - -#~ msgid "Please verify your password first" -#~ msgstr "最初にパスワードを確認してください" - -#~ msgid "AccessKey ID" -#~ msgstr "アクセスキーID" - -#~ msgid "Unknown ip" -#~ msgstr "不明なip" - -#~ msgid "" -#~ "Windows needs to download the client to connect SSH assets, and the MacOS " -#~ "system uses its own terminal" -#~ msgstr "" -#~ "WindowsはクライアントをダウンロードしてSSH資産に接続する必要があり、macOS" -#~ "システムは独自のTerminalを採用している。" diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 80cdf63bd..a35dad64a 100644 --- a/apps/locale/zh/LC_MESSAGES/django.mo +++ b/apps/locale/zh/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db8f93ff4f52dd61dd019fa9f615eb0bef6cfcf6fc0db01a08db7e2f86ca8c82 -size 105699 +oid sha256:2ea5daa59f376f85ad67dde8332499637e0e82999dcf051853589d1ebf22eca3 +size 105893 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index c0ce1706c..3b3aeb02f 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-16 10:20+0800\n" +"POT-Creation-Date: 2022-06-16 11:12+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -1245,16 +1245,12 @@ msgid "Password can not contains `{{` " msgstr "密码不能包含 `{{` 字符" #: assets/serializers/utils.py:14 -#, fuzzy -#| msgid "Password can not contains `{{` " msgid "Password can not contains `'` " -msgstr "密码不能包含 `{{` 字符" +msgstr "密码不能包含 `'` 字符" #: assets/serializers/utils.py:16 -#, fuzzy -#| msgid "Password can not contains `{{` " msgid "Password can not contains `\"` " -msgstr "密码不能包含 `{{` 字符" +msgstr "密码不能包含 `\"` 字符" #: assets/tasks/account_connectivity.py:30 msgid "The asset {} system platform {} does not support run Ansible tasks" @@ -6755,17 +6751,3 @@ msgstr "旗舰版" #: xpack/plugins/license/models.py:77 msgid "Community edition" msgstr "社区版" - -#~ msgid "Please verify your password first" -#~ msgstr "请检查密码" - -#~ msgid "AccessKey ID" -#~ msgstr "Access key ID" - -#~ msgid "Unknown ip" -#~ msgstr "未知ip" - -#~ msgid "" -#~ "Windows needs to download the client to connect SSH assets, and the MacOS " -#~ "system uses its own terminal" -#~ msgstr "Windows 需要下载客户端来连接SSH资产,macOS系统采用自带的Terminal" From 75a72fb18231b8be4baab37555f65ccf05ac5933 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 16 Jun 2022 11:28:34 +0800 Subject: [PATCH 3/4] fix: user confirm bug --- apps/authentication/api/confirm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/api/confirm.py b/apps/authentication/api/confirm.py index c77a1d533..9041f6e85 100644 --- a/apps/authentication/api/confirm.py +++ b/apps/authentication/api/confirm.py @@ -22,7 +22,7 @@ class ConfirmViewSet(ListCreateAPIView): def check(self, confirm_type: str): if confirm_type == ConfirmType.MFA: - return bool(MFAOtp(self.user).is_active()) + return self.user.mfa_enabled if confirm_type == ConfirmType.PASSWORD: return self.user.is_password_authenticate() From 2be74c4b84d27b4f63cd5cb8adf52461cb2706d5 Mon Sep 17 00:00:00 2001 From: "Jiangjie.Bai" Date: Thu, 16 Jun 2022 13:16:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99500=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修复命令列表模糊搜索报错500的问题 --- apps/terminal/backends/command/es.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/terminal/backends/command/es.py b/apps/terminal/backends/command/es.py index ae76b2974..1387f6656 100644 --- a/apps/terminal/backends/command/es.py +++ b/apps/terminal/backends/command/es.py @@ -297,6 +297,9 @@ class QuerySet(DJQuerySet): self._command_store_config = command_store_config self._storage = CommandStore(command_store_config) + # 命令列表模糊搜索时报错 + super().__init__() + @lazyproperty def _grouped_method_calls(self): _method_calls = {k: list(v) for k, v in groupby(self._method_calls, lambda x: x[0])}