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() diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index 50947cea2..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:8a0e0ef94fd1cf5b3d41c378b54e8af2fb502c7f1e9d6a3e54084e8113978561 -size 127495 +oid sha256:449dcbd8e4b4f133d45e01642bb42a20477b09309d2b916f1aff9e854e6864e8 +size 128120 diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po index 11310178e..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-14 15:48+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" @@ -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ビット" @@ -6839,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 e5b16f047..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:1ab23fa4d87b928318281150ff64d9c2e3782a9169a3c3e6907808b1be63dbc3 -size 105365 +oid sha256:2ea5daa59f376f85ad67dde8332499637e0e82999dcf051853589d1ebf22eca3 +size 105893 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 634bea865..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-14 15:48+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" @@ -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,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 "资产 {} 系统平台 {} 不支持运行 Ansible 任务" @@ -3032,7 +3040,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 +3096,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 +3114,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 +4501,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 +4513,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 +6194,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 位" @@ -6738,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" 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 %}

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])}