From f91bfedc50d4701e65a6c062db83483b5917272e Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Tue, 14 Jun 2022 16:03:42 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=8E=88=E6=9D=83=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E9=80=9A=E7=9F=A5?= 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 | 366 +++++++++--------- apps/locale/zh/LC_MESSAGES/django.mo | 4 +- apps/locale/zh/LC_MESSAGES/django.po | 353 ++++++++--------- apps/locale/zh/LC_MESSAGES/djangojs.po | 1 - apps/perms/notifications.py | 15 +- apps/perms/tasks.py | 64 ++- .../perms/_msg_item_permissions_expire.html | 2 +- .../perms/_msg_permed_items_expire.html | 2 +- 9 files changed, 430 insertions(+), 381 deletions(-) diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index 2f0a7842c..50947cea2 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:82cdb805f6d681577806fb6fc41178b5dd28eafc68b1348f433ba7f7f5ce9920 -size 127478 +oid sha256:8a0e0ef94fd1cf5b3d41c378b54e8af2fb502c7f1e9d6a3e54084e8113978561 +size 127495 diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po index 2d7a87994..11310178e 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-05-31 16:02+0800\n" +"POT-Creation-Date: 2022-06-14 15:48+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,12 +38,12 @@ msgid "Name" msgstr "名前" #: acls/models/base.py:27 assets/models/cmd_filter.py:84 -#: assets/models/user.py:247 terminal/models/endpoint.py:62 +#: assets/models/user.py:251 terminal/models/endpoint.py:62 msgid "Priority" msgstr "優先順位" #: acls/models/base.py:28 assets/models/cmd_filter.py:84 -#: assets/models/user.py:247 terminal/models/endpoint.py:63 +#: assets/models/user.py:251 terminal/models/endpoint.py:63 msgid "1-100, the lower the value will be match first" msgstr "1-100、低い値は最初に一致します" @@ -93,8 +93,8 @@ msgstr "ログイン確認" #: terminal/backends/command/models.py:20 #: terminal/backends/command/serializers.py:12 terminal/models/session.py:44 #: terminal/notifications.py:91 terminal/notifications.py:139 -#: tickets/models/comment.py:17 users/const.py:14 users/models/user.py:883 -#: users/models/user.py:914 users/serializers/group.py:19 +#: tickets/models/comment.py:17 users/const.py:14 users/models/user.py:888 +#: users/models/user.py:919 users/serializers/group.py:19 msgid "User" msgstr "ユーザー" @@ -129,7 +129,7 @@ msgstr "システムユーザー" #: assets/models/asset.py:386 assets/models/authbook.py:19 #: assets/models/backup.py:31 assets/models/cmd_filter.py:38 #: assets/models/gathered_user.py:14 assets/serializers/label.py:30 -#: assets/serializers/system_user.py:269 audits/models.py:39 +#: assets/serializers/system_user.py:268 audits/models.py:39 #: perms/models/asset_permission.py:23 terminal/backends/command/models.py:21 #: terminal/backends/command/serializers.py:13 terminal/models/session.py:46 #: terminal/notifications.py:90 @@ -179,7 +179,7 @@ msgstr "" #: acls/serializers/login_asset_acl.py:31 acls/serializers/rules/rules.py:33 #: applications/serializers/attrs/application_type/mysql_workbench.py:18 #: assets/models/asset.py:210 assets/models/domain.py:60 -#: assets/serializers/account.py:14 +#: assets/serializers/account.py:13 #: authentication/templates/authentication/_msg_oauth_bind.html:12 #: authentication/templates/authentication/_msg_rest_password_success.html:8 #: authentication/templates/authentication/_msg_rest_public_key_success.html:8 @@ -188,7 +188,7 @@ msgid "IP" msgstr "IP" #: acls/serializers/login_asset_acl.py:35 assets/models/asset.py:211 -#: assets/serializers/account.py:15 assets/serializers/gathered_user.py:23 +#: assets/serializers/account.py:14 assets/serializers/gathered_user.py:23 #: settings/serializers/terminal.py:7 msgid "Hostname" msgstr "ホスト名" @@ -202,7 +202,7 @@ msgstr "" "ション: {}" #: acls/serializers/login_asset_acl.py:55 assets/models/asset.py:213 -#: assets/models/domain.py:62 assets/models/user.py:248 +#: assets/models/domain.py:62 assets/models/user.py:252 #: terminal/serializers/session.py:30 terminal/serializers/storage.py:68 msgid "Protocol" msgstr "プロトコル" @@ -265,7 +265,7 @@ msgid "Application" msgstr "アプリケーション" #: applications/models/account.py:15 assets/models/authbook.py:20 -#: assets/models/cmd_filter.py:42 assets/models/user.py:338 audits/models.py:40 +#: assets/models/cmd_filter.py:42 assets/models/user.py:342 audits/models.py:40 #: perms/models/application_permission.py:33 #: perms/models/asset_permission.py:25 terminal/backends/command/models.py:22 #: terminal/backends/command/serializers.py:35 terminal/models/session.py:48 @@ -303,7 +303,7 @@ msgstr "カテゴリ" #: applications/models/application.py:222 #: applications/serializers/application.py:101 assets/models/backup.py:49 -#: assets/models/cmd_filter.py:82 assets/models/user.py:246 +#: assets/models/cmd_filter.py:82 assets/models/user.py:250 #: perms/models/application_permission.py:24 #: perms/serializers/application/user_permission.py:34 #: terminal/models/storage.py:57 terminal/models/storage.py:141 @@ -341,7 +341,7 @@ msgstr "カテゴリ表示" #: applications/serializers/application.py:71 #: applications/serializers/application.py:102 -#: assets/serializers/cmd_filter.py:34 assets/serializers/system_user.py:29 +#: assets/serializers/cmd_filter.py:34 assets/serializers/system_user.py:34 #: audits/serializers.py:29 perms/serializers/application/permission.py:19 #: tickets/serializers/ticket/meta/ticket_type/apply_application.py:33 #: tickets/serializers/ticket/ticket.py:21 @@ -353,17 +353,17 @@ msgstr "タイプ表示" #: assets/models/base.py:181 assets/models/cluster.py:26 #: assets/models/domain.py:26 assets/models/gathered_user.py:19 #: assets/models/group.py:22 assets/models/label.py:25 -#: assets/serializers/account.py:19 assets/serializers/cmd_filter.py:28 +#: assets/serializers/account.py:18 assets/serializers/cmd_filter.py:28 #: assets/serializers/cmd_filter.py:48 common/db/models.py:113 #: common/mixins/models.py:50 ops/models/adhoc.py:39 ops/models/command.py:30 #: orgs/models.py:67 orgs/models.py:217 perms/models/base.py:92 -#: users/models/group.py:18 users/models/user.py:915 +#: users/models/group.py:18 users/models/user.py:920 #: xpack/plugins/cloud/models.py:125 msgid "Date created" msgstr "作成された日付" #: applications/serializers/application.py:104 assets/models/base.py:182 -#: assets/models/gathered_user.py:20 assets/serializers/account.py:22 +#: assets/models/gathered_user.py:20 assets/serializers/account.py:21 #: assets/serializers/cmd_filter.py:29 assets/serializers/cmd_filter.py:49 #: common/db/models.py:114 common/mixins/models.py:51 ops/models/adhoc.py:40 #: orgs/models.py:218 @@ -413,7 +413,7 @@ msgid "Application path" msgstr "アプリケーションパス" #: applications/serializers/attrs/application_category/remote_app.py:44 -#: assets/serializers/system_user.py:168 +#: assets/serializers/system_user.py:167 #: xpack/plugins/change_auth_plan/serializers/asset.py:67 #: xpack/plugins/change_auth_plan/serializers/asset.py:70 #: xpack/plugins/change_auth_plan/serializers/asset.py:73 @@ -510,7 +510,7 @@ msgid "Internal" msgstr "内部" #: assets/models/asset.py:162 assets/models/asset.py:216 -#: assets/serializers/account.py:16 assets/serializers/asset.py:63 +#: assets/serializers/account.py:15 assets/serializers/asset.py:63 #: perms/serializers/asset/user_permission.py:43 msgid "Platform" msgstr "プラットフォーム" @@ -571,13 +571,13 @@ msgstr "システムアーキテクチャ" msgid "Hostname raw" msgstr "ホスト名生" -#: assets/models/asset.py:215 assets/serializers/account.py:17 +#: assets/models/asset.py:215 assets/serializers/account.py:16 #: assets/serializers/asset.py:65 perms/serializers/asset/user_permission.py:41 #: xpack/plugins/cloud/models.py:107 xpack/plugins/cloud/serializers/task.py:42 msgid "Protocols" msgstr "プロトコル" -#: assets/models/asset.py:218 assets/models/user.py:238 +#: assets/models/asset.py:218 assets/models/user.py:242 #: perms/models/asset_permission.py:24 #: xpack/plugins/change_auth_plan/models/asset.py:43 #: xpack/plugins/gathered_user/models.py:24 @@ -590,7 +590,7 @@ msgid "Is active" msgstr "アクティブです。" #: assets/models/asset.py:222 assets/models/cluster.py:19 -#: assets/models/user.py:235 assets/models/user.py:390 +#: assets/models/user.py:239 assets/models/user.py:394 msgid "Admin user" msgstr "管理ユーザー" @@ -759,9 +759,9 @@ msgstr "接続性" msgid "Date verified" msgstr "確認済みの日付" -#: assets/models/base.py:177 assets/serializers/base.py:14 -#: assets/serializers/base.py:36 audits/signal_handlers.py:48 -#: authentication/forms.py:32 +#: assets/models/base.py:177 assets/serializers/base.py:15 +#: assets/serializers/base.py:37 assets/serializers/system_user.py:29 +#: audits/signal_handlers.py:50 authentication/forms.py:32 #: authentication/templates/authentication/login.html:182 #: settings/serializers/auth/ldap.py:25 settings/serializers/auth/ldap.py:46 #: users/forms/profile.py:22 users/serializers/user.py:92 @@ -776,7 +776,7 @@ msgstr "確認済みの日付" msgid "Password" msgstr "パスワード" -#: assets/models/base.py:178 assets/serializers/base.py:39 +#: assets/models/base.py:178 assets/serializers/base.py:41 #: xpack/plugins/change_auth_plan/models/asset.py:53 #: xpack/plugins/change_auth_plan/models/asset.py:130 #: xpack/plugins/change_auth_plan/models/asset.py:206 @@ -823,7 +823,7 @@ msgid "Default" msgstr "デフォルト" #: assets/models/cluster.py:36 assets/models/label.py:14 rbac/const.py:6 -#: users/models/user.py:900 +#: users/models/user.py:905 msgid "System" msgstr "システム" @@ -961,7 +961,7 @@ msgstr "フルバリュー" msgid "Parent key" msgstr "親キー" -#: assets/models/node.py:559 assets/serializers/system_user.py:268 +#: assets/models/node.py:559 assets/serializers/system_user.py:267 #: xpack/plugins/cloud/models.py:96 xpack/plugins/cloud/serializers/task.py:69 msgid "Node" msgstr "ノード" @@ -970,78 +970,78 @@ msgstr "ノード" msgid "Can match node" msgstr "ノードを一致させることができます" -#: assets/models/user.py:229 +#: assets/models/user.py:233 msgid "Automatic managed" msgstr "自動管理" -#: assets/models/user.py:230 +#: assets/models/user.py:234 msgid "Manually input" msgstr "手動入力" -#: assets/models/user.py:234 +#: assets/models/user.py:238 msgid "Common user" msgstr "共通ユーザー" -#: assets/models/user.py:237 +#: assets/models/user.py:241 msgid "Username same with user" msgstr "ユーザーと同じユーザー名" -#: assets/models/user.py:240 assets/serializers/domain.py:30 +#: assets/models/user.py:244 assets/serializers/domain.py:30 #: terminal/templates/terminal/_msg_command_execute_alert.html:16 #: xpack/plugins/change_auth_plan/models/asset.py:39 msgid "Assets" msgstr "資産" -#: assets/models/user.py:244 users/apps.py:9 +#: assets/models/user.py:248 users/apps.py:9 msgid "Users" msgstr "ユーザー" -#: assets/models/user.py:245 +#: assets/models/user.py:249 msgid "User groups" msgstr "ユーザーグループ" -#: assets/models/user.py:249 +#: assets/models/user.py:253 msgid "Auto push" msgstr "オートプッシュ" -#: assets/models/user.py:250 +#: assets/models/user.py:254 msgid "Sudo" msgstr "すど" -#: assets/models/user.py:251 +#: assets/models/user.py:255 msgid "Shell" msgstr "シェル" -#: assets/models/user.py:252 +#: assets/models/user.py:256 msgid "Login mode" msgstr "ログインモード" -#: assets/models/user.py:253 +#: assets/models/user.py:257 msgid "SFTP Root" msgstr "SFTPルート" -#: assets/models/user.py:254 assets/serializers/system_user.py:32 +#: assets/models/user.py:258 assets/serializers/system_user.py:37 #: authentication/models.py:49 msgid "Token" msgstr "トークン" -#: assets/models/user.py:255 +#: assets/models/user.py:259 msgid "Home" msgstr "ホーム" -#: assets/models/user.py:256 +#: assets/models/user.py:260 msgid "System groups" msgstr "システムグループ" -#: assets/models/user.py:259 +#: assets/models/user.py:263 msgid "User switch" msgstr "ユーザースイッチ" -#: assets/models/user.py:260 +#: assets/models/user.py:264 msgid "Switch from" msgstr "から切り替え" -#: assets/models/user.py:340 +#: assets/models/user.py:344 msgid "Can match system user" msgstr "システムユーザーに一致できます" @@ -1072,7 +1072,7 @@ msgstr "" "されていません-個人情報にアクセスしてください-> ファイル暗号化パスワードを設" "定してください暗号化パスワード" -#: assets/serializers/account.py:41 assets/serializers/account.py:84 +#: assets/serializers/account.py:36 assets/serializers/account.py:79 msgid "System user display" msgstr "システムユーザー表示" @@ -1127,15 +1127,15 @@ msgstr "定期的なパフォーマンス" msgid "Currently only mail sending is supported" msgstr "現在、メール送信のみがサポートされています" -#: assets/serializers/base.py:15 users/models/user.py:689 +#: assets/serializers/base.py:16 users/models/user.py:689 msgid "Private key" msgstr "ssh秘密鍵" -#: assets/serializers/base.py:43 +#: assets/serializers/base.py:45 msgid "Key password" msgstr "キーパスワード" -#: assets/serializers/base.py:56 +#: assets/serializers/base.py:58 msgid "private key invalid or passphrase error" msgstr "秘密鍵が無効またはpassphraseエラー" @@ -1148,7 +1148,7 @@ msgid "Pattern" msgstr "パターン" #: assets/serializers/domain.py:14 assets/serializers/label.py:12 -#: assets/serializers/system_user.py:64 +#: assets/serializers/system_user.py:63 #: perms/serializers/asset/permission.py:49 msgid "Assets amount" msgstr "資産額" @@ -1173,78 +1173,78 @@ msgstr "含まれない:/" msgid "The same level node name cannot be the same" msgstr "同じレベルのノード名を同じにすることはできません。" -#: assets/serializers/system_user.py:30 +#: assets/serializers/system_user.py:35 msgid "SSH key fingerprint" msgstr "SSHキー指紋" -#: assets/serializers/system_user.py:35 +#: assets/serializers/system_user.py:40 #: perms/serializers/application/permission.py:46 msgid "Apps amount" msgstr "アプリの量" -#: assets/serializers/system_user.py:63 +#: assets/serializers/system_user.py:62 #: perms/serializers/asset/permission.py:50 msgid "Nodes amount" msgstr "ノード量" -#: assets/serializers/system_user.py:65 assets/serializers/system_user.py:270 +#: assets/serializers/system_user.py:64 assets/serializers/system_user.py:269 msgid "Login mode display" msgstr "ログインモード表示" -#: assets/serializers/system_user.py:67 +#: assets/serializers/system_user.py:66 msgid "Ad domain" msgstr "広告ドメイン" -#: assets/serializers/system_user.py:68 +#: assets/serializers/system_user.py:67 msgid "Is asset protocol" msgstr "資産プロトコルです" -#: assets/serializers/system_user.py:69 +#: assets/serializers/system_user.py:68 msgid "Only ssh and automatic login system users are supported" msgstr "sshと自動ログインシステムのユーザーのみがサポートされています" -#: assets/serializers/system_user.py:109 +#: assets/serializers/system_user.py:108 msgid "Username same with user with protocol {} only allow 1" msgstr "プロトコル {} のユーザーと同じユーザー名は1のみ許可します" -#: assets/serializers/system_user.py:122 common/validators.py:14 +#: assets/serializers/system_user.py:121 common/validators.py:14 msgid "Special char not allowed" msgstr "特別なcharは許可されていません" -#: assets/serializers/system_user.py:132 +#: assets/serializers/system_user.py:131 msgid "* Automatic login mode must fill in the username." msgstr "* 自動ログインモードはユーザー名を入力する必要があります。" -#: assets/serializers/system_user.py:147 +#: assets/serializers/system_user.py:146 msgid "Path should starts with /" msgstr "パスは/で始まる必要があります" -#: assets/serializers/system_user.py:159 +#: assets/serializers/system_user.py:158 msgid "Password or private key required" msgstr "パスワードまたは秘密鍵が必要" -#: assets/serializers/system_user.py:173 +#: assets/serializers/system_user.py:172 msgid "Only ssh protocol system users are allowed" msgstr "Sshプロトコルシステムユーザーのみが許可されています" -#: assets/serializers/system_user.py:177 +#: assets/serializers/system_user.py:176 msgid "The protocol must be consistent with the current user: {}" msgstr "プロトコルは現在のユーザーと一致している必要があります: {}" -#: assets/serializers/system_user.py:181 +#: assets/serializers/system_user.py:180 msgid "Only system users with automatic login are allowed" msgstr "自動ログインを持つシステムユーザーのみが許可されます" -#: assets/serializers/system_user.py:289 +#: assets/serializers/system_user.py:288 msgid "System user name" msgstr "システムユーザー名" -#: assets/serializers/system_user.py:290 orgs/mixins/serializers.py:26 +#: assets/serializers/system_user.py:289 orgs/mixins/serializers.py:26 #: rbac/serializers/rolebinding.py:23 msgid "Org name" msgstr "組織名" -#: assets/serializers/system_user.py:299 +#: assets/serializers/system_user.py:298 msgid "Asset hostname" msgstr "資産ホスト名" @@ -1313,24 +1313,24 @@ msgstr "" "セルフチェックのタスクはすでに実行されており、繰り返し開始することはできませ" "ん" -#: assets/tasks/push_system_user.py:200 +#: assets/tasks/push_system_user.py:201 msgid "System user is dynamic: {}" msgstr "システムユーザーは動的です: {}" -#: assets/tasks/push_system_user.py:241 +#: assets/tasks/push_system_user.py:242 msgid "Start push system user for platform: [{}]" msgstr "プラットフォームのプッシュシステムユーザーを開始: [{}]" -#: assets/tasks/push_system_user.py:242 +#: assets/tasks/push_system_user.py:243 #: assets/tasks/system_user_connectivity.py:106 msgid "Hosts count: {}" msgstr "ホスト数: {}" -#: assets/tasks/push_system_user.py:263 assets/tasks/push_system_user.py:296 +#: assets/tasks/push_system_user.py:264 assets/tasks/push_system_user.py:297 msgid "Push system users to assets: " msgstr "システムユーザーを資産にプッシュする:" -#: assets/tasks/push_system_user.py:275 +#: assets/tasks/push_system_user.py:276 msgid "Push system users to asset: " msgstr "システムユーザーをアセットにプッシュする:" @@ -1562,202 +1562,216 @@ msgstr "ディスプレイとして実行する" msgid "User display" msgstr "ユーザー表示" -#: audits/signal_handlers.py:47 +#: audits/signal_handlers.py:49 msgid "SSH Key" msgstr "SSHキー" -#: audits/signal_handlers.py:49 +#: audits/signal_handlers.py:51 msgid "SSO" msgstr "SSO" -#: audits/signal_handlers.py:50 +#: audits/signal_handlers.py:52 msgid "Auth Token" msgstr "認証トークン" -#: audits/signal_handlers.py:51 authentication/notifications.py:73 -#: authentication/views/login.py:164 authentication/views/wecom.py:182 +#: audits/signal_handlers.py:53 authentication/notifications.py:73 +#: authentication/views/login.py:164 authentication/views/wecom.py:177 #: notifications/backends/__init__.py:11 users/models/user.py:720 msgid "WeCom" msgstr "企業微信" -#: audits/signal_handlers.py:52 authentication/views/dingtalk.py:183 +#: audits/signal_handlers.py:54 authentication/views/dingtalk.py:179 #: authentication/views/login.py:170 notifications/backends/__init__.py:12 #: users/models/user.py:721 msgid "DingTalk" msgstr "DingTalk" -#: audits/signal_handlers.py:53 authentication/models.py:76 +#: audits/signal_handlers.py:55 authentication/models.py:76 msgid "Temporary token" msgstr "仮パスワード" -#: audits/signal_handlers.py:65 +#: audits/signal_handlers.py:67 msgid "User and Group" msgstr "ユーザーとグループ" -#: audits/signal_handlers.py:66 +#: audits/signal_handlers.py:68 #, python-brace-format msgid "{User} JOINED {UserGroup}" msgstr "{User} に参加 {UserGroup}" -#: audits/signal_handlers.py:67 +#: audits/signal_handlers.py:69 #, python-brace-format msgid "{User} LEFT {UserGroup}" msgstr "{User} のそばを通る {UserGroup}" -#: audits/signal_handlers.py:70 +#: audits/signal_handlers.py:72 msgid "Asset and SystemUser" msgstr "資産およびシステム・ユーザー" -#: audits/signal_handlers.py:71 +#: audits/signal_handlers.py:73 #, python-brace-format msgid "{Asset} ADD {SystemUser}" msgstr "{Asset} 追加 {SystemUser}" -#: audits/signal_handlers.py:72 +#: audits/signal_handlers.py:74 #, python-brace-format msgid "{Asset} REMOVE {SystemUser}" msgstr "{Asset} 削除 {SystemUser}" -#: audits/signal_handlers.py:75 +#: audits/signal_handlers.py:77 msgid "Node and Asset" msgstr "ノードと資産" -#: audits/signal_handlers.py:76 +#: audits/signal_handlers.py:78 #, python-brace-format msgid "{Node} ADD {Asset}" msgstr "{Node} 追加 {Asset}" -#: audits/signal_handlers.py:77 +#: audits/signal_handlers.py:79 #, python-brace-format msgid "{Node} REMOVE {Asset}" msgstr "{Node} 削除 {Asset}" -#: audits/signal_handlers.py:80 +#: audits/signal_handlers.py:82 msgid "User asset permissions" msgstr "ユーザー資産の権限" -#: audits/signal_handlers.py:81 +#: audits/signal_handlers.py:83 #, python-brace-format msgid "{AssetPermission} ADD {User}" msgstr "{AssetPermission} 追加 {User}" -#: audits/signal_handlers.py:82 +#: audits/signal_handlers.py:84 #, python-brace-format msgid "{AssetPermission} REMOVE {User}" msgstr "{AssetPermission} 削除 {User}" -#: audits/signal_handlers.py:85 +#: audits/signal_handlers.py:87 msgid "User group asset permissions" msgstr "ユーザーグループの資産権限" -#: audits/signal_handlers.py:86 +#: audits/signal_handlers.py:88 #, python-brace-format msgid "{AssetPermission} ADD {UserGroup}" msgstr "{AssetPermission} 追加 {UserGroup}" -#: audits/signal_handlers.py:87 +#: audits/signal_handlers.py:89 #, python-brace-format msgid "{AssetPermission} REMOVE {UserGroup}" msgstr "{AssetPermission} 削除 {UserGroup}" -#: audits/signal_handlers.py:90 perms/models/asset_permission.py:29 +#: audits/signal_handlers.py:92 perms/models/asset_permission.py:29 msgid "Asset permission" msgstr "資産権限" -#: audits/signal_handlers.py:91 +#: audits/signal_handlers.py:93 #, python-brace-format msgid "{AssetPermission} ADD {Asset}" msgstr "{AssetPermission} 追加 {Asset}" -#: audits/signal_handlers.py:92 +#: audits/signal_handlers.py:94 #, python-brace-format msgid "{AssetPermission} REMOVE {Asset}" msgstr "{AssetPermission} 削除 {Asset}" -#: audits/signal_handlers.py:95 +#: audits/signal_handlers.py:97 msgid "Node permission" msgstr "ノード権限" -#: audits/signal_handlers.py:96 +#: audits/signal_handlers.py:98 #, python-brace-format msgid "{AssetPermission} ADD {Node}" msgstr "{AssetPermission} 追加 {Node}" -#: audits/signal_handlers.py:97 +#: audits/signal_handlers.py:99 #, python-brace-format msgid "{AssetPermission} REMOVE {Node}" msgstr "{AssetPermission} 削除 {Node}" -#: audits/signal_handlers.py:100 +#: audits/signal_handlers.py:102 msgid "Asset permission and SystemUser" msgstr "資産権限とSystemUser" -#: audits/signal_handlers.py:101 +#: audits/signal_handlers.py:103 #, python-brace-format msgid "{AssetPermission} ADD {SystemUser}" msgstr "{AssetPermission} 追加 {SystemUser}" -#: audits/signal_handlers.py:102 +#: audits/signal_handlers.py:104 #, python-brace-format msgid "{AssetPermission} REMOVE {SystemUser}" msgstr "{AssetPermission} 削除 {SystemUser}" -#: audits/signal_handlers.py:105 +#: audits/signal_handlers.py:107 msgid "User application permissions" msgstr "ユーザーアプリケーションの権限" -#: audits/signal_handlers.py:106 +#: audits/signal_handlers.py:108 #, python-brace-format msgid "{ApplicationPermission} ADD {User}" msgstr "{ApplicationPermission} 追加 {User}" -#: audits/signal_handlers.py:107 +#: audits/signal_handlers.py:109 #, python-brace-format msgid "{ApplicationPermission} REMOVE {User}" msgstr "{ApplicationPermission} 削除 {User}" -#: audits/signal_handlers.py:110 +#: audits/signal_handlers.py:112 msgid "User group application permissions" msgstr "ユーザーグループアプリケーションの権限" -#: audits/signal_handlers.py:111 +#: audits/signal_handlers.py:113 #, python-brace-format msgid "{ApplicationPermission} ADD {UserGroup}" msgstr "{ApplicationPermission} 追加 {UserGroup}" -#: audits/signal_handlers.py:112 +#: audits/signal_handlers.py:114 #, python-brace-format msgid "{ApplicationPermission} REMOVE {UserGroup}" msgstr "{ApplicationPermission} 削除 {UserGroup}" -#: audits/signal_handlers.py:115 perms/models/application_permission.py:38 +#: audits/signal_handlers.py:117 perms/models/application_permission.py:38 msgid "Application permission" msgstr "申請許可" -#: audits/signal_handlers.py:116 +#: audits/signal_handlers.py:118 #, python-brace-format msgid "{ApplicationPermission} ADD {Application}" msgstr "{ApplicationPermission} 追加 {Application}" -#: audits/signal_handlers.py:117 +#: audits/signal_handlers.py:119 #, python-brace-format msgid "{ApplicationPermission} REMOVE {Application}" msgstr "{ApplicationPermission} 削除 {Application}" -#: audits/signal_handlers.py:120 +#: audits/signal_handlers.py:122 msgid "Application permission and SystemUser" msgstr "アプリケーション権限とSystemUser" -#: audits/signal_handlers.py:121 +#: audits/signal_handlers.py:123 #, python-brace-format msgid "{ApplicationPermission} ADD {SystemUser}" msgstr "{ApplicationPermission} 追加 {SystemUser}" -#: audits/signal_handlers.py:122 +#: audits/signal_handlers.py:124 #, python-brace-format 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 "認証に失敗しました (ユーザー名またはパスワードが正しくありません): {}" + +#: authentication/api/confirm.py:48 +msgid "Login time has exceeded {} minutes, please login again" +msgstr "" + +#: authentication/api/confirm.py:72 common/exceptions.py:47 +msgid "This action require verify your MFA" +msgstr "このアクションでは、MFAの確認が必要です。" + #: authentication/api/connection_token.py:326 msgid "Invalid token" msgstr "無効なトークン" @@ -2199,7 +2213,7 @@ msgstr "コードエラー" #: authentication/templates/authentication/_msg_reset_password.html:3 #: authentication/templates/authentication/_msg_rest_password_success.html:2 #: authentication/templates/authentication/_msg_rest_public_key_success.html:2 -#: jumpserver/conf.py:304 ops/tasks.py:145 ops/tasks.py:148 +#: jumpserver/conf.py:305 ops/tasks.py:145 ops/tasks.py:148 #: perms/templates/perms/_msg_item_permissions_expire.html:3 #: perms/templates/perms/_msg_permed_items_expire.html:3 #: tickets/templates/tickets/approve_check_password.html:23 @@ -2342,54 +2356,49 @@ msgstr "返品" msgid "Copy success" msgstr "コピー成功" -#: authentication/views/dingtalk.py:40 +#: authentication/views/dingtalk.py:41 msgid "DingTalk Error, Please contact your system administrator" msgstr "DingTalkエラー、システム管理者に連絡してください" -#: authentication/views/dingtalk.py:43 +#: authentication/views/dingtalk.py:44 msgid "DingTalk Error" msgstr "DingTalkエラー" -#: authentication/views/dingtalk.py:55 authentication/views/feishu.py:50 +#: authentication/views/dingtalk.py:56 authentication/views/feishu.py:50 #: authentication/views/wecom.py:55 msgid "" "The system configuration is incorrect. Please contact your administrator" msgstr "システム設定が正しくありません。管理者に連絡してください" -#: authentication/views/dingtalk.py:79 +#: authentication/views/dingtalk.py:80 msgid "DingTalk is already bound" msgstr "DingTalkはすでにバインドされています" -#: authentication/views/dingtalk.py:128 authentication/views/feishu.py:99 -#: authentication/views/wecom.py:128 -msgid "Please verify your password first" -msgstr "最初にパスワードを確認してください" - -#: authentication/views/dingtalk.py:152 authentication/views/wecom.py:152 +#: authentication/views/dingtalk.py:148 authentication/views/wecom.py:147 msgid "Invalid user_id" msgstr "無効なuser_id" -#: authentication/views/dingtalk.py:168 +#: authentication/views/dingtalk.py:164 msgid "DingTalk query user failed" msgstr "DingTalkクエリユーザーが失敗しました" -#: authentication/views/dingtalk.py:177 +#: authentication/views/dingtalk.py:173 msgid "The DingTalk is already bound to another user" msgstr "DingTalkはすでに別のユーザーにバインドされています" -#: authentication/views/dingtalk.py:184 +#: authentication/views/dingtalk.py:180 msgid "Binding DingTalk successfully" msgstr "DingTalkのバインドに成功" -#: authentication/views/dingtalk.py:240 authentication/views/dingtalk.py:294 +#: authentication/views/dingtalk.py:236 authentication/views/dingtalk.py:290 msgid "Failed to get user from DingTalk" msgstr "DingTalkからユーザーを取得できませんでした" -#: authentication/views/dingtalk.py:246 authentication/views/dingtalk.py:300 +#: authentication/views/dingtalk.py:242 authentication/views/dingtalk.py:296 msgid "DingTalk is not bound" msgstr "DingTalkはバインドされていません" -#: authentication/views/dingtalk.py:247 authentication/views/dingtalk.py:301 +#: authentication/views/dingtalk.py:243 authentication/views/dingtalk.py:297 msgid "Please login with a password and then bind the DingTalk" msgstr "パスワードでログインし、DingTalkをバインドしてください" @@ -2401,32 +2410,32 @@ msgstr "FeiShuエラー" msgid "FeiShu is already bound" msgstr "FeiShuはすでにバインドされています" -#: authentication/views/feishu.py:133 +#: authentication/views/feishu.py:128 msgid "FeiShu query user failed" msgstr "FeiShuクエリユーザーが失敗しました" -#: authentication/views/feishu.py:142 +#: authentication/views/feishu.py:137 msgid "The FeiShu is already bound to another user" msgstr "FeiShuはすでに別のユーザーにバインドされています" -#: authentication/views/feishu.py:148 authentication/views/login.py:176 +#: authentication/views/feishu.py:143 authentication/views/login.py:176 #: notifications/backends/__init__.py:14 users/models/user.py:722 msgid "FeiShu" msgstr "本を飛ばす" -#: authentication/views/feishu.py:149 +#: authentication/views/feishu.py:144 msgid "Binding FeiShu successfully" msgstr "本を飛ばすのバインドに成功" -#: authentication/views/feishu.py:201 +#: authentication/views/feishu.py:196 msgid "Failed to get user from FeiShu" msgstr "本を飛ばすからユーザーを取得できませんでした" -#: authentication/views/feishu.py:207 +#: authentication/views/feishu.py:202 msgid "FeiShu is not bound" msgstr "本を飛ばすは拘束されていません" -#: authentication/views/feishu.py:208 +#: authentication/views/feishu.py:203 msgid "Please login with a password and then bind the FeiShu" msgstr "パスワードでログインしてから本を飛ばすをバインドしてください" @@ -2474,27 +2483,27 @@ msgstr "企業微信エラー" msgid "WeCom is already bound" msgstr "企業の微信はすでにバインドされています" -#: authentication/views/wecom.py:167 +#: authentication/views/wecom.py:162 msgid "WeCom query user failed" msgstr "企業微信ユーザーの問合せに失敗しました" -#: authentication/views/wecom.py:176 +#: authentication/views/wecom.py:171 msgid "The WeCom is already bound to another user" msgstr "この企業の微信はすでに他のユーザーをバインドしている。" -#: authentication/views/wecom.py:183 +#: authentication/views/wecom.py:178 msgid "Binding WeCom successfully" msgstr "企業の微信のバインドに成功" -#: authentication/views/wecom.py:235 authentication/views/wecom.py:289 +#: authentication/views/wecom.py:230 authentication/views/wecom.py:284 msgid "Failed to get user from WeCom" msgstr "企業の微信からユーザーを取得できませんでした" -#: authentication/views/wecom.py:241 authentication/views/wecom.py:295 +#: authentication/views/wecom.py:236 authentication/views/wecom.py:290 msgid "WeCom is not bound" msgstr "企業の微信をバインドしていません" -#: authentication/views/wecom.py:242 authentication/views/wecom.py:296 +#: authentication/views/wecom.py:237 authentication/views/wecom.py:291 msgid "Please login with a password and then bind the WeCom" msgstr "パスワードでログインしてからWeComをバインドしてください" @@ -2577,10 +2586,6 @@ msgstr "M2Mリバースは許可されません" msgid "Is referenced by other objects and cannot be deleted" msgstr "他のオブジェクトによって参照され、削除できません。" -#: common/exceptions.py:47 -msgid "This action require verify your MFA" -msgstr "このアクションでは、MFAの確認が必要です。" - #: common/exceptions.py:53 msgid "Unexpect error occur" msgstr "予期しないエラーが発生します" @@ -2670,11 +2675,11 @@ msgstr "特殊文字を含むべきではない" msgid "The mobile phone number format is incorrect" msgstr "携帯電話番号の形式が正しくありません" -#: jumpserver/conf.py:303 +#: jumpserver/conf.py:304 msgid "Create account successfully" msgstr "アカウントを正常に作成" -#: jumpserver/conf.py:305 +#: jumpserver/conf.py:306 msgid "Your account has been created successfully" msgstr "アカウントが正常に作成されました" @@ -3037,35 +3042,35 @@ msgstr "クリップボードコピーペースト" msgid "From ticket" msgstr "チケットから" -#: perms/notifications.py:17 +#: perms/notifications.py:18 msgid "You permed assets is about to expire" msgstr "パーマ資産の有効期限が近づいています" -#: perms/notifications.py:21 +#: perms/notifications.py:23 msgid "permed assets" msgstr "パーマ資産" -#: perms/notifications.py:59 +#: perms/notifications.py:62 msgid "Asset permissions is about to expire" msgstr "資産権限の有効期限が近づいています" -#: perms/notifications.py:63 +#: perms/notifications.py:67 msgid "asset permissions of organization {}" msgstr "組織 {} の資産権限" -#: perms/notifications.py:89 +#: perms/notifications.py:94 msgid "Your permed applications is about to expire" msgstr "パーマアプリケーションの有効期限が近づいています" -#: perms/notifications.py:92 +#: perms/notifications.py:98 msgid "permed applications" msgstr "Permedアプリケーション" -#: perms/notifications.py:127 +#: perms/notifications.py:134 msgid "Application permissions is about to expire" msgstr "アプリケーション権限の有効期限が近づいています" -#: perms/notifications.py:130 +#: perms/notifications.py:137 msgid "application permissions of organization {}" msgstr "Organization {} のアプリケーション権限" @@ -3123,14 +3128,18 @@ msgstr "システムユーザーの表示" #: perms/templates/perms/_msg_item_permissions_expire.html:7 #: perms/templates/perms/_msg_permed_items_expire.html:7 -#, python-format +#, fuzzy, python-format +#| msgid "" +#| "\n" +#| " The following %(item_type)s will expire in %(count)s days\n" +#| " " msgid "" "\n" -" The following %(item_type)s will expire in 3 days\n" +" The following %(item_type)s will expire in %%(count)s days\n" " " msgstr "" "\n" -" 次の %(item_type)s は3日以内に期限切れになります\n" +" 次の %(item_type)s は %(count)s 日以内に期限切れになります\n" " " #: perms/templates/perms/_msg_permed_items_expire.html:21 @@ -3141,6 +3150,10 @@ msgstr "質問があったら、管理者に連絡して下さい" msgid "My applications" msgstr "私のアプリケーション" +#: perms/utils/asset/user_permission.py:620 rbac/tree.py:59 +msgid "My assets" +msgstr "私の資産" + #: rbac/api/role.py:34 msgid "Internal role, can't be destroy" msgstr "内部の役割は、破壊することはできません" @@ -3149,7 +3162,7 @@ msgstr "内部の役割は、破壊することはできません" msgid "The role has been bound to users, can't be destroy" msgstr "ロールはユーザーにバインドされており、破壊することはできません" -#: rbac/api/role.py:45 +#: rbac/api/role.py:60 msgid "Internal role, can't be update" msgstr "内部ロール、更新できません" @@ -3328,10 +3341,6 @@ msgstr "資産の改ざん" msgid "Terminal setting" msgstr "ターミナル設定" -#: rbac/tree.py:59 -msgid "My assets" -msgstr "私の資産" - #: rbac/tree.py:60 msgid "My apps" msgstr "マイアプリ" @@ -3597,8 +3606,8 @@ msgid "" "User attr map present how to map OpenID user attr to jumpserver, username," "name,email is jumpserver attr" msgstr "" -"ユーザー属性マッピングは、OpenIDのユーザー属性をjumpserverユーザーにマッピング" -"する方法、username, name,emailはjumpserverのユーザーが必要とする属性です" +"ユーザー属性マッピングは、OpenIDのユーザー属性をjumpserverユーザーにマッピン" +"グする方法、username, name,emailはjumpserverのユーザーが必要とする属性です" #: settings/serializers/auth/oidc.py:44 msgid "Use Keycloak" @@ -4283,7 +4292,9 @@ msgid "Enable database proxy" msgstr "属性マップの有効化" #: settings/serializers/terminal.py:37 -msgid "Enable XRDP" +#, fuzzy +#| msgid "Enable XRDP" +msgid "Enable Razor" msgstr "XRDPの有効化" #: settings/serializers/terminal.py:38 @@ -5700,27 +5711,27 @@ msgstr "最終更新日パスワード" msgid "Need update password" msgstr "更新パスワードが必要" -#: users/models/user.py:885 +#: users/models/user.py:890 msgid "Can invite user" msgstr "ユーザーを招待できます" -#: users/models/user.py:886 +#: users/models/user.py:891 msgid "Can remove user" msgstr "ユーザーを削除できます" -#: users/models/user.py:887 +#: users/models/user.py:892 msgid "Can match user" msgstr "ユーザーに一致できます" -#: users/models/user.py:896 +#: users/models/user.py:901 msgid "Administrator" msgstr "管理者" -#: users/models/user.py:899 +#: users/models/user.py:904 msgid "Administrator is the super user of system" msgstr "管理者はシステムのスーパーユーザーです" -#: users/models/user.py:924 +#: users/models/user.py:929 msgid "User password history" msgstr "ユーザーパスワード履歴" @@ -6829,6 +6840,9 @@ msgstr "究極のエディション" msgid "Community edition" msgstr "コミュニティ版" +#~ msgid "Please verify your password first" +#~ msgstr "最初にパスワードを確認してください" + #~ msgid "AccessKey ID" #~ msgstr "アクセスキーID" diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 65a32959d..e5b16f047 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:b03f7f9c1d450f8a3012330c00d084c88465d99e355c42ec10f568a8ffa7611c -size 105357 +oid sha256:1ab23fa4d87b928318281150ff64d9c2e3782a9169a3c3e6907808b1be63dbc3 +size 105365 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 8560a07ac..634bea865 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-05-31 16:02+0800\n" +"POT-Creation-Date: 2022-06-14 15:48+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -37,12 +37,12 @@ msgid "Name" msgstr "名称" #: acls/models/base.py:27 assets/models/cmd_filter.py:84 -#: assets/models/user.py:247 terminal/models/endpoint.py:62 +#: assets/models/user.py:251 terminal/models/endpoint.py:62 msgid "Priority" msgstr "优先级" #: acls/models/base.py:28 assets/models/cmd_filter.py:84 -#: assets/models/user.py:247 terminal/models/endpoint.py:63 +#: assets/models/user.py:251 terminal/models/endpoint.py:63 msgid "1-100, the lower the value will be match first" msgstr "优先级可选范围为 1-100 (数值越小越优先)" @@ -92,8 +92,8 @@ msgstr "登录复核" #: terminal/backends/command/models.py:20 #: terminal/backends/command/serializers.py:12 terminal/models/session.py:44 #: terminal/notifications.py:91 terminal/notifications.py:139 -#: tickets/models/comment.py:17 users/const.py:14 users/models/user.py:883 -#: users/models/user.py:914 users/serializers/group.py:19 +#: tickets/models/comment.py:17 users/const.py:14 users/models/user.py:888 +#: users/models/user.py:919 users/serializers/group.py:19 msgid "User" msgstr "用户" @@ -128,7 +128,7 @@ msgstr "系统用户" #: assets/models/asset.py:386 assets/models/authbook.py:19 #: assets/models/backup.py:31 assets/models/cmd_filter.py:38 #: assets/models/gathered_user.py:14 assets/serializers/label.py:30 -#: assets/serializers/system_user.py:269 audits/models.py:39 +#: assets/serializers/system_user.py:268 audits/models.py:39 #: perms/models/asset_permission.py:23 terminal/backends/command/models.py:21 #: terminal/backends/command/serializers.py:13 terminal/models/session.py:46 #: terminal/notifications.py:90 @@ -177,7 +177,7 @@ msgstr "" #: acls/serializers/login_asset_acl.py:31 acls/serializers/rules/rules.py:33 #: applications/serializers/attrs/application_type/mysql_workbench.py:18 #: assets/models/asset.py:210 assets/models/domain.py:60 -#: assets/serializers/account.py:14 +#: assets/serializers/account.py:13 #: authentication/templates/authentication/_msg_oauth_bind.html:12 #: authentication/templates/authentication/_msg_rest_password_success.html:8 #: authentication/templates/authentication/_msg_rest_public_key_success.html:8 @@ -186,7 +186,7 @@ msgid "IP" msgstr "IP" #: acls/serializers/login_asset_acl.py:35 assets/models/asset.py:211 -#: assets/serializers/account.py:15 assets/serializers/gathered_user.py:23 +#: assets/serializers/account.py:14 assets/serializers/gathered_user.py:23 #: settings/serializers/terminal.py:7 msgid "Hostname" msgstr "主机名" @@ -198,7 +198,7 @@ msgid "" msgstr "格式为逗号分隔的字符串, * 表示匹配所有. 可选的协议有: {}" #: acls/serializers/login_asset_acl.py:55 assets/models/asset.py:213 -#: assets/models/domain.py:62 assets/models/user.py:248 +#: assets/models/domain.py:62 assets/models/user.py:252 #: terminal/serializers/session.py:30 terminal/serializers/storage.py:68 msgid "Protocol" msgstr "协议" @@ -260,7 +260,7 @@ msgid "Application" msgstr "应用程序" #: applications/models/account.py:15 assets/models/authbook.py:20 -#: assets/models/cmd_filter.py:42 assets/models/user.py:338 audits/models.py:40 +#: assets/models/cmd_filter.py:42 assets/models/user.py:342 audits/models.py:40 #: perms/models/application_permission.py:33 #: perms/models/asset_permission.py:25 terminal/backends/command/models.py:22 #: terminal/backends/command/serializers.py:35 terminal/models/session.py:48 @@ -298,7 +298,7 @@ msgstr "类别" #: applications/models/application.py:222 #: applications/serializers/application.py:101 assets/models/backup.py:49 -#: assets/models/cmd_filter.py:82 assets/models/user.py:246 +#: assets/models/cmd_filter.py:82 assets/models/user.py:250 #: perms/models/application_permission.py:24 #: perms/serializers/application/user_permission.py:34 #: terminal/models/storage.py:57 terminal/models/storage.py:141 @@ -336,7 +336,7 @@ msgstr "类别名称" #: applications/serializers/application.py:71 #: applications/serializers/application.py:102 -#: assets/serializers/cmd_filter.py:34 assets/serializers/system_user.py:29 +#: assets/serializers/cmd_filter.py:34 assets/serializers/system_user.py:34 #: audits/serializers.py:29 perms/serializers/application/permission.py:19 #: tickets/serializers/ticket/meta/ticket_type/apply_application.py:33 #: tickets/serializers/ticket/ticket.py:21 @@ -348,17 +348,17 @@ msgstr "类型名称" #: assets/models/base.py:181 assets/models/cluster.py:26 #: assets/models/domain.py:26 assets/models/gathered_user.py:19 #: assets/models/group.py:22 assets/models/label.py:25 -#: assets/serializers/account.py:19 assets/serializers/cmd_filter.py:28 +#: assets/serializers/account.py:18 assets/serializers/cmd_filter.py:28 #: assets/serializers/cmd_filter.py:48 common/db/models.py:113 #: common/mixins/models.py:50 ops/models/adhoc.py:39 ops/models/command.py:30 #: orgs/models.py:67 orgs/models.py:217 perms/models/base.py:92 -#: users/models/group.py:18 users/models/user.py:915 +#: users/models/group.py:18 users/models/user.py:920 #: xpack/plugins/cloud/models.py:125 msgid "Date created" msgstr "创建日期" #: applications/serializers/application.py:104 assets/models/base.py:182 -#: assets/models/gathered_user.py:20 assets/serializers/account.py:22 +#: assets/models/gathered_user.py:20 assets/serializers/account.py:21 #: assets/serializers/cmd_filter.py:29 assets/serializers/cmd_filter.py:49 #: common/db/models.py:114 common/mixins/models.py:51 ops/models/adhoc.py:40 #: orgs/models.py:218 @@ -408,7 +408,7 @@ msgid "Application path" msgstr "应用路径" #: applications/serializers/attrs/application_category/remote_app.py:44 -#: assets/serializers/system_user.py:168 +#: assets/serializers/system_user.py:167 #: xpack/plugins/change_auth_plan/serializers/asset.py:67 #: xpack/plugins/change_auth_plan/serializers/asset.py:70 #: xpack/plugins/change_auth_plan/serializers/asset.py:73 @@ -505,7 +505,7 @@ msgid "Internal" msgstr "内部的" #: assets/models/asset.py:162 assets/models/asset.py:216 -#: assets/serializers/account.py:16 assets/serializers/asset.py:63 +#: assets/serializers/account.py:15 assets/serializers/asset.py:63 #: perms/serializers/asset/user_permission.py:43 msgid "Platform" msgstr "系统平台" @@ -566,13 +566,13 @@ msgstr "系统架构" msgid "Hostname raw" msgstr "主机名原始" -#: assets/models/asset.py:215 assets/serializers/account.py:17 +#: assets/models/asset.py:215 assets/serializers/account.py:16 #: assets/serializers/asset.py:65 perms/serializers/asset/user_permission.py:41 #: xpack/plugins/cloud/models.py:107 xpack/plugins/cloud/serializers/task.py:42 msgid "Protocols" msgstr "协议组" -#: assets/models/asset.py:218 assets/models/user.py:238 +#: assets/models/asset.py:218 assets/models/user.py:242 #: perms/models/asset_permission.py:24 #: xpack/plugins/change_auth_plan/models/asset.py:43 #: xpack/plugins/gathered_user/models.py:24 @@ -585,7 +585,7 @@ msgid "Is active" msgstr "激活" #: assets/models/asset.py:222 assets/models/cluster.py:19 -#: assets/models/user.py:235 assets/models/user.py:390 +#: assets/models/user.py:239 assets/models/user.py:394 msgid "Admin user" msgstr "特权用户" @@ -754,9 +754,9 @@ msgstr "可连接性" msgid "Date verified" msgstr "校验日期" -#: assets/models/base.py:177 assets/serializers/base.py:14 -#: assets/serializers/base.py:36 audits/signal_handlers.py:48 -#: authentication/forms.py:32 +#: assets/models/base.py:177 assets/serializers/base.py:15 +#: assets/serializers/base.py:37 assets/serializers/system_user.py:29 +#: audits/signal_handlers.py:50 authentication/forms.py:32 #: authentication/templates/authentication/login.html:182 #: settings/serializers/auth/ldap.py:25 settings/serializers/auth/ldap.py:46 #: users/forms/profile.py:22 users/serializers/user.py:92 @@ -771,7 +771,7 @@ msgstr "校验日期" msgid "Password" msgstr "密码" -#: assets/models/base.py:178 assets/serializers/base.py:39 +#: assets/models/base.py:178 assets/serializers/base.py:41 #: xpack/plugins/change_auth_plan/models/asset.py:53 #: xpack/plugins/change_auth_plan/models/asset.py:130 #: xpack/plugins/change_auth_plan/models/asset.py:206 @@ -818,7 +818,7 @@ msgid "Default" msgstr "默认" #: assets/models/cluster.py:36 assets/models/label.py:14 rbac/const.py:6 -#: users/models/user.py:900 +#: users/models/user.py:905 msgid "System" msgstr "系统" @@ -956,7 +956,7 @@ msgstr "全称" msgid "Parent key" msgstr "ssh私钥" -#: assets/models/node.py:559 assets/serializers/system_user.py:268 +#: assets/models/node.py:559 assets/serializers/system_user.py:267 #: xpack/plugins/cloud/models.py:96 xpack/plugins/cloud/serializers/task.py:69 msgid "Node" msgstr "节点" @@ -965,78 +965,78 @@ msgstr "节点" msgid "Can match node" msgstr "可以匹配节点" -#: assets/models/user.py:229 +#: assets/models/user.py:233 msgid "Automatic managed" msgstr "托管密码" -#: assets/models/user.py:230 +#: assets/models/user.py:234 msgid "Manually input" msgstr "手动输入" -#: assets/models/user.py:234 +#: assets/models/user.py:238 msgid "Common user" msgstr "普通用户" -#: assets/models/user.py:237 +#: assets/models/user.py:241 msgid "Username same with user" msgstr "用户名与用户相同" -#: assets/models/user.py:240 assets/serializers/domain.py:30 +#: assets/models/user.py:244 assets/serializers/domain.py:30 #: terminal/templates/terminal/_msg_command_execute_alert.html:16 #: xpack/plugins/change_auth_plan/models/asset.py:39 msgid "Assets" msgstr "资产" -#: assets/models/user.py:244 users/apps.py:9 +#: assets/models/user.py:248 users/apps.py:9 msgid "Users" msgstr "用户管理" -#: assets/models/user.py:245 +#: assets/models/user.py:249 msgid "User groups" msgstr "用户组" -#: assets/models/user.py:249 +#: assets/models/user.py:253 msgid "Auto push" msgstr "自动推送" -#: assets/models/user.py:250 +#: assets/models/user.py:254 msgid "Sudo" msgstr "Sudo" -#: assets/models/user.py:251 +#: assets/models/user.py:255 msgid "Shell" msgstr "Shell" -#: assets/models/user.py:252 +#: assets/models/user.py:256 msgid "Login mode" msgstr "认证方式" -#: assets/models/user.py:253 +#: assets/models/user.py:257 msgid "SFTP Root" msgstr "SFTP根路径" -#: assets/models/user.py:254 assets/serializers/system_user.py:32 +#: assets/models/user.py:258 assets/serializers/system_user.py:37 #: authentication/models.py:49 msgid "Token" msgstr "Token" -#: assets/models/user.py:255 +#: assets/models/user.py:259 msgid "Home" msgstr "家目录" -#: assets/models/user.py:256 +#: assets/models/user.py:260 msgid "System groups" msgstr "用户组" -#: assets/models/user.py:259 +#: assets/models/user.py:263 msgid "User switch" msgstr "用户切换" -#: assets/models/user.py:260 +#: assets/models/user.py:264 msgid "Switch from" msgstr "切换自" -#: assets/models/user.py:340 +#: assets/models/user.py:344 msgid "Can match system user" msgstr "可以匹配系统用户" @@ -1064,7 +1064,7 @@ msgstr "" "{} - 账号备份任务已完成: 未设置加密密码 - 请前往个人信息 -> 文件加密密码中设" "置加密密码" -#: assets/serializers/account.py:41 assets/serializers/account.py:84 +#: assets/serializers/account.py:36 assets/serializers/account.py:79 msgid "System user display" msgstr "系统用户名称" @@ -1119,15 +1119,15 @@ msgstr "定时执行" msgid "Currently only mail sending is supported" msgstr "当前只支持邮件发送" -#: assets/serializers/base.py:15 users/models/user.py:689 +#: assets/serializers/base.py:16 users/models/user.py:689 msgid "Private key" msgstr "ssh私钥" -#: assets/serializers/base.py:43 +#: assets/serializers/base.py:45 msgid "Key password" msgstr "密钥密码" -#: assets/serializers/base.py:56 +#: assets/serializers/base.py:58 msgid "private key invalid or passphrase error" msgstr "密钥不合法或密钥密码错误" @@ -1140,7 +1140,7 @@ msgid "Pattern" msgstr "模式" #: assets/serializers/domain.py:14 assets/serializers/label.py:12 -#: assets/serializers/system_user.py:64 +#: assets/serializers/system_user.py:63 #: perms/serializers/asset/permission.py:49 msgid "Assets amount" msgstr "资产数量" @@ -1165,78 +1165,78 @@ msgstr "不能包含: /" msgid "The same level node name cannot be the same" msgstr "同级别节点名字不能重复" -#: assets/serializers/system_user.py:30 +#: assets/serializers/system_user.py:35 msgid "SSH key fingerprint" msgstr "密钥指纹" -#: assets/serializers/system_user.py:35 +#: assets/serializers/system_user.py:40 #: perms/serializers/application/permission.py:46 msgid "Apps amount" msgstr "应用数量" -#: assets/serializers/system_user.py:63 +#: assets/serializers/system_user.py:62 #: perms/serializers/asset/permission.py:50 msgid "Nodes amount" msgstr "节点数量" -#: assets/serializers/system_user.py:65 assets/serializers/system_user.py:270 +#: assets/serializers/system_user.py:64 assets/serializers/system_user.py:269 msgid "Login mode display" msgstr "认证方式名称" -#: assets/serializers/system_user.py:67 +#: assets/serializers/system_user.py:66 msgid "Ad domain" msgstr "Ad 网域" -#: assets/serializers/system_user.py:68 +#: assets/serializers/system_user.py:67 msgid "Is asset protocol" msgstr "资产协议" -#: assets/serializers/system_user.py:69 +#: assets/serializers/system_user.py:68 msgid "Only ssh and automatic login system users are supported" msgstr "仅支持ssh协议和自动登录的系统用户" -#: assets/serializers/system_user.py:109 +#: assets/serializers/system_user.py:108 msgid "Username same with user with protocol {} only allow 1" msgstr "用户名和用户相同的一种协议只允许存在一个" -#: assets/serializers/system_user.py:122 common/validators.py:14 +#: assets/serializers/system_user.py:121 common/validators.py:14 msgid "Special char not allowed" msgstr "不能包含特殊字符" -#: assets/serializers/system_user.py:132 +#: assets/serializers/system_user.py:131 msgid "* Automatic login mode must fill in the username." msgstr "自动登录模式,必须填写用户名" -#: assets/serializers/system_user.py:147 +#: assets/serializers/system_user.py:146 msgid "Path should starts with /" msgstr "路径应该以 / 开头" -#: assets/serializers/system_user.py:159 +#: assets/serializers/system_user.py:158 msgid "Password or private key required" msgstr "密码或密钥密码需要一个" -#: assets/serializers/system_user.py:173 +#: assets/serializers/system_user.py:172 msgid "Only ssh protocol system users are allowed" msgstr "仅允许ssh协议的系统用户" -#: assets/serializers/system_user.py:177 +#: assets/serializers/system_user.py:176 msgid "The protocol must be consistent with the current user: {}" msgstr "协议必须和当前用户保持一致: {}" -#: assets/serializers/system_user.py:181 +#: assets/serializers/system_user.py:180 msgid "Only system users with automatic login are allowed" msgstr "仅允许自动登录的系统用户" -#: assets/serializers/system_user.py:289 +#: assets/serializers/system_user.py:288 msgid "System user name" msgstr "系统用户名称" -#: assets/serializers/system_user.py:290 orgs/mixins/serializers.py:26 +#: assets/serializers/system_user.py:289 orgs/mixins/serializers.py:26 #: rbac/serializers/rolebinding.py:23 msgid "Org name" msgstr "组织名称" -#: assets/serializers/system_user.py:299 +#: assets/serializers/system_user.py:298 msgid "Asset hostname" msgstr "资产主机名" @@ -1301,24 +1301,24 @@ msgid "" "The task of self-checking is already running and cannot be started repeatedly" msgstr "自检程序已经在运行,不能重复启动" -#: assets/tasks/push_system_user.py:200 +#: assets/tasks/push_system_user.py:201 msgid "System user is dynamic: {}" msgstr "系统用户是动态的: {}" -#: assets/tasks/push_system_user.py:241 +#: assets/tasks/push_system_user.py:242 msgid "Start push system user for platform: [{}]" msgstr "推送系统用户到平台: [{}]" -#: assets/tasks/push_system_user.py:242 +#: assets/tasks/push_system_user.py:243 #: assets/tasks/system_user_connectivity.py:106 msgid "Hosts count: {}" msgstr "主机数量: {}" -#: assets/tasks/push_system_user.py:263 assets/tasks/push_system_user.py:296 +#: assets/tasks/push_system_user.py:264 assets/tasks/push_system_user.py:297 msgid "Push system users to assets: " msgstr "推送系统用户到入资产: " -#: assets/tasks/push_system_user.py:275 +#: assets/tasks/push_system_user.py:276 msgid "Push system users to asset: " msgstr "推送系统用户到入资产: " @@ -1550,202 +1550,214 @@ msgstr "运行用户名称" msgid "User display" msgstr "用户名称" -#: audits/signal_handlers.py:47 +#: audits/signal_handlers.py:49 msgid "SSH Key" msgstr "SSH 密钥" -#: audits/signal_handlers.py:49 +#: audits/signal_handlers.py:51 msgid "SSO" msgstr "SSO" -#: audits/signal_handlers.py:50 +#: audits/signal_handlers.py:52 msgid "Auth Token" msgstr "认证令牌" -#: audits/signal_handlers.py:51 authentication/notifications.py:73 -#: authentication/views/login.py:164 authentication/views/wecom.py:182 +#: audits/signal_handlers.py:53 authentication/notifications.py:73 +#: authentication/views/login.py:164 authentication/views/wecom.py:177 #: notifications/backends/__init__.py:11 users/models/user.py:720 msgid "WeCom" msgstr "企业微信" -#: audits/signal_handlers.py:52 authentication/views/dingtalk.py:183 +#: audits/signal_handlers.py:54 authentication/views/dingtalk.py:179 #: authentication/views/login.py:170 notifications/backends/__init__.py:12 #: users/models/user.py:721 msgid "DingTalk" msgstr "钉钉" -#: audits/signal_handlers.py:53 authentication/models.py:76 +#: audits/signal_handlers.py:55 authentication/models.py:76 msgid "Temporary token" msgstr "临时密码" -#: audits/signal_handlers.py:65 +#: audits/signal_handlers.py:67 msgid "User and Group" msgstr "用户与用户组" -#: audits/signal_handlers.py:66 +#: audits/signal_handlers.py:68 #, python-brace-format msgid "{User} JOINED {UserGroup}" msgstr "{User} 加入 {UserGroup}" -#: audits/signal_handlers.py:67 +#: audits/signal_handlers.py:69 #, python-brace-format msgid "{User} LEFT {UserGroup}" msgstr "{User} 离开 {UserGroup}" -#: audits/signal_handlers.py:70 +#: audits/signal_handlers.py:72 msgid "Asset and SystemUser" msgstr "资产与系统用户" -#: audits/signal_handlers.py:71 +#: audits/signal_handlers.py:73 #, python-brace-format msgid "{Asset} ADD {SystemUser}" msgstr "{Asset} 添加 {SystemUser}" -#: audits/signal_handlers.py:72 +#: audits/signal_handlers.py:74 #, python-brace-format msgid "{Asset} REMOVE {SystemUser}" msgstr "{Asset} 移除 {SystemUser}" -#: audits/signal_handlers.py:75 +#: audits/signal_handlers.py:77 msgid "Node and Asset" msgstr "节点与资产" -#: audits/signal_handlers.py:76 +#: audits/signal_handlers.py:78 #, python-brace-format msgid "{Node} ADD {Asset}" msgstr "{Node} 添加 {Asset}" -#: audits/signal_handlers.py:77 +#: audits/signal_handlers.py:79 #, python-brace-format msgid "{Node} REMOVE {Asset}" msgstr "{Node} 移除 {Asset}" -#: audits/signal_handlers.py:80 +#: audits/signal_handlers.py:82 msgid "User asset permissions" msgstr "用户资产授权" -#: audits/signal_handlers.py:81 +#: audits/signal_handlers.py:83 #, python-brace-format msgid "{AssetPermission} ADD {User}" msgstr "{AssetPermission} 添加 {User}" -#: audits/signal_handlers.py:82 +#: audits/signal_handlers.py:84 #, python-brace-format msgid "{AssetPermission} REMOVE {User}" msgstr "{AssetPermission} 移除 {User}" -#: audits/signal_handlers.py:85 +#: audits/signal_handlers.py:87 msgid "User group asset permissions" msgstr "用户组资产授权" -#: audits/signal_handlers.py:86 +#: audits/signal_handlers.py:88 #, python-brace-format msgid "{AssetPermission} ADD {UserGroup}" msgstr "{AssetPermission} 添加 {UserGroup}" -#: audits/signal_handlers.py:87 +#: audits/signal_handlers.py:89 #, python-brace-format msgid "{AssetPermission} REMOVE {UserGroup}" msgstr "{AssetPermission} 移除 {UserGroup}" -#: audits/signal_handlers.py:90 perms/models/asset_permission.py:29 +#: audits/signal_handlers.py:92 perms/models/asset_permission.py:29 msgid "Asset permission" msgstr "资产授权" -#: audits/signal_handlers.py:91 +#: audits/signal_handlers.py:93 #, python-brace-format msgid "{AssetPermission} ADD {Asset}" msgstr "{AssetPermission} 添加 {Asset}" -#: audits/signal_handlers.py:92 +#: audits/signal_handlers.py:94 #, python-brace-format msgid "{AssetPermission} REMOVE {Asset}" msgstr "{AssetPermission} 移除 {Asset}" -#: audits/signal_handlers.py:95 +#: audits/signal_handlers.py:97 msgid "Node permission" msgstr "节点授权" -#: audits/signal_handlers.py:96 +#: audits/signal_handlers.py:98 #, python-brace-format msgid "{AssetPermission} ADD {Node}" msgstr "{AssetPermission} 添加 {Node}" -#: audits/signal_handlers.py:97 +#: audits/signal_handlers.py:99 #, python-brace-format msgid "{AssetPermission} REMOVE {Node}" msgstr "{AssetPermission} 移除 {Node}" -#: audits/signal_handlers.py:100 +#: audits/signal_handlers.py:102 msgid "Asset permission and SystemUser" msgstr "资产授权与系统用户" -#: audits/signal_handlers.py:101 +#: audits/signal_handlers.py:103 #, python-brace-format msgid "{AssetPermission} ADD {SystemUser}" msgstr "{AssetPermission} 添加 {SystemUser}" -#: audits/signal_handlers.py:102 +#: audits/signal_handlers.py:104 #, python-brace-format msgid "{AssetPermission} REMOVE {SystemUser}" msgstr "{AssetPermission} 移除 {SystemUser}" -#: audits/signal_handlers.py:105 +#: audits/signal_handlers.py:107 msgid "User application permissions" msgstr "用户应用授权" -#: audits/signal_handlers.py:106 +#: audits/signal_handlers.py:108 #, python-brace-format msgid "{ApplicationPermission} ADD {User}" msgstr "{ApplicationPermission} 添加 {User}" -#: audits/signal_handlers.py:107 +#: audits/signal_handlers.py:109 #, python-brace-format msgid "{ApplicationPermission} REMOVE {User}" msgstr "{ApplicationPermission} 移除 {User}" -#: audits/signal_handlers.py:110 +#: audits/signal_handlers.py:112 msgid "User group application permissions" msgstr "用户组应用授权" -#: audits/signal_handlers.py:111 +#: audits/signal_handlers.py:113 #, python-brace-format msgid "{ApplicationPermission} ADD {UserGroup}" msgstr "{ApplicationPermission} 添加 {UserGroup}" -#: audits/signal_handlers.py:112 +#: audits/signal_handlers.py:114 #, python-brace-format msgid "{ApplicationPermission} REMOVE {UserGroup}" msgstr "{ApplicationPermission} 移除 {UserGroup}" -#: audits/signal_handlers.py:115 perms/models/application_permission.py:38 +#: audits/signal_handlers.py:117 perms/models/application_permission.py:38 msgid "Application permission" msgstr "应用授权" -#: audits/signal_handlers.py:116 +#: audits/signal_handlers.py:118 #, python-brace-format msgid "{ApplicationPermission} ADD {Application}" msgstr "{ApplicationPermission} 添加 {Application}" -#: audits/signal_handlers.py:117 +#: audits/signal_handlers.py:119 #, python-brace-format msgid "{ApplicationPermission} REMOVE {Application}" msgstr "{ApplicationPermission} 移除 {Application}" -#: audits/signal_handlers.py:120 +#: audits/signal_handlers.py:122 msgid "Application permission and SystemUser" msgstr "应用授权与系统用户" -#: audits/signal_handlers.py:121 +#: audits/signal_handlers.py:123 #, python-brace-format msgid "{ApplicationPermission} ADD {SystemUser}" msgstr "{ApplicationPermission} 添加 {SystemUser}" -#: audits/signal_handlers.py:122 +#: audits/signal_handlers.py:124 #, python-brace-format msgid "{ApplicationPermission} REMOVE {SystemUser}" msgstr "{ApplicationPermission} 移除 {SystemUser}" +#: authentication/api/confirm.py:40 +msgid "Authentication failed password incorrect" +msgstr "认证失败 (用户名或密码不正确): {}" + +#: authentication/api/confirm.py:48 +msgid "Login time has exceeded {} minutes, please login again" +msgstr "" + +#: authentication/api/confirm.py:72 common/exceptions.py:47 +msgid "This action require verify your MFA" +msgstr "这个操作需要验证 MFA" + #: authentication/api/connection_token.py:326 msgid "Invalid token" msgstr "无效的令牌" @@ -2178,7 +2190,7 @@ msgstr "代码错误" #: authentication/templates/authentication/_msg_reset_password.html:3 #: authentication/templates/authentication/_msg_rest_password_success.html:2 #: authentication/templates/authentication/_msg_rest_public_key_success.html:2 -#: jumpserver/conf.py:304 ops/tasks.py:145 ops/tasks.py:148 +#: jumpserver/conf.py:305 ops/tasks.py:145 ops/tasks.py:148 #: perms/templates/perms/_msg_item_permissions_expire.html:3 #: perms/templates/perms/_msg_permed_items_expire.html:3 #: tickets/templates/tickets/approve_check_password.html:23 @@ -2312,54 +2324,49 @@ msgstr "返回" msgid "Copy success" msgstr "复制成功" -#: authentication/views/dingtalk.py:40 +#: authentication/views/dingtalk.py:41 msgid "DingTalk Error, Please contact your system administrator" msgstr "钉钉错误,请联系系统管理员" -#: authentication/views/dingtalk.py:43 +#: authentication/views/dingtalk.py:44 msgid "DingTalk Error" msgstr "钉钉错误" -#: authentication/views/dingtalk.py:55 authentication/views/feishu.py:50 +#: authentication/views/dingtalk.py:56 authentication/views/feishu.py:50 #: authentication/views/wecom.py:55 msgid "" "The system configuration is incorrect. Please contact your administrator" msgstr "企业配置错误,请联系系统管理员" -#: authentication/views/dingtalk.py:79 +#: authentication/views/dingtalk.py:80 msgid "DingTalk is already bound" msgstr "钉钉已经绑定" -#: authentication/views/dingtalk.py:128 authentication/views/feishu.py:99 -#: authentication/views/wecom.py:128 -msgid "Please verify your password first" -msgstr "请检查密码" - -#: authentication/views/dingtalk.py:152 authentication/views/wecom.py:152 +#: authentication/views/dingtalk.py:148 authentication/views/wecom.py:147 msgid "Invalid user_id" msgstr "无效的 user_id" -#: authentication/views/dingtalk.py:168 +#: authentication/views/dingtalk.py:164 msgid "DingTalk query user failed" msgstr "钉钉查询用户失败" -#: authentication/views/dingtalk.py:177 +#: authentication/views/dingtalk.py:173 msgid "The DingTalk is already bound to another user" msgstr "该钉钉已经绑定其他用户" -#: authentication/views/dingtalk.py:184 +#: authentication/views/dingtalk.py:180 msgid "Binding DingTalk successfully" msgstr "绑定 钉钉 成功" -#: authentication/views/dingtalk.py:240 authentication/views/dingtalk.py:294 +#: authentication/views/dingtalk.py:236 authentication/views/dingtalk.py:290 msgid "Failed to get user from DingTalk" msgstr "从钉钉获取用户失败" -#: authentication/views/dingtalk.py:246 authentication/views/dingtalk.py:300 +#: authentication/views/dingtalk.py:242 authentication/views/dingtalk.py:296 msgid "DingTalk is not bound" msgstr "钉钉没有绑定" -#: authentication/views/dingtalk.py:247 authentication/views/dingtalk.py:301 +#: authentication/views/dingtalk.py:243 authentication/views/dingtalk.py:297 msgid "Please login with a password and then bind the DingTalk" msgstr "请使用密码登录,然后绑定钉钉" @@ -2371,32 +2378,32 @@ msgstr "飞书错误" msgid "FeiShu is already bound" msgstr "飞书已经绑定" -#: authentication/views/feishu.py:133 +#: authentication/views/feishu.py:128 msgid "FeiShu query user failed" msgstr "飞书查询用户失败" -#: authentication/views/feishu.py:142 +#: authentication/views/feishu.py:137 msgid "The FeiShu is already bound to another user" msgstr "该飞书已经绑定其他用户" -#: authentication/views/feishu.py:148 authentication/views/login.py:176 +#: authentication/views/feishu.py:143 authentication/views/login.py:176 #: notifications/backends/__init__.py:14 users/models/user.py:722 msgid "FeiShu" msgstr "飞书" -#: authentication/views/feishu.py:149 +#: authentication/views/feishu.py:144 msgid "Binding FeiShu successfully" msgstr "绑定 飞书 成功" -#: authentication/views/feishu.py:201 +#: authentication/views/feishu.py:196 msgid "Failed to get user from FeiShu" msgstr "从飞书获取用户失败" -#: authentication/views/feishu.py:207 +#: authentication/views/feishu.py:202 msgid "FeiShu is not bound" msgstr "没有绑定飞书" -#: authentication/views/feishu.py:208 +#: authentication/views/feishu.py:203 msgid "Please login with a password and then bind the FeiShu" msgstr "请使用密码登录,然后绑定飞书" @@ -2444,27 +2451,27 @@ msgstr "企业微信错误" msgid "WeCom is already bound" msgstr "企业微信已经绑定" -#: authentication/views/wecom.py:167 +#: authentication/views/wecom.py:162 msgid "WeCom query user failed" msgstr "企业微信查询用户失败" -#: authentication/views/wecom.py:176 +#: authentication/views/wecom.py:171 msgid "The WeCom is already bound to another user" msgstr "该企业微信已经绑定其他用户" -#: authentication/views/wecom.py:183 +#: authentication/views/wecom.py:178 msgid "Binding WeCom successfully" msgstr "绑定 企业微信 成功" -#: authentication/views/wecom.py:235 authentication/views/wecom.py:289 +#: authentication/views/wecom.py:230 authentication/views/wecom.py:284 msgid "Failed to get user from WeCom" msgstr "从企业微信获取用户失败" -#: authentication/views/wecom.py:241 authentication/views/wecom.py:295 +#: authentication/views/wecom.py:236 authentication/views/wecom.py:290 msgid "WeCom is not bound" msgstr "没有绑定企业微信" -#: authentication/views/wecom.py:242 authentication/views/wecom.py:296 +#: authentication/views/wecom.py:237 authentication/views/wecom.py:291 msgid "Please login with a password and then bind the WeCom" msgstr "请使用密码登录,然后绑定企业微信" @@ -2547,10 +2554,6 @@ msgstr "多对多反向是不被允许的" msgid "Is referenced by other objects and cannot be deleted" msgstr "被其他对象关联,不能删除" -#: common/exceptions.py:47 -msgid "This action require verify your MFA" -msgstr "这个操作需要验证 MFA" - #: common/exceptions.py:53 msgid "Unexpect error occur" msgstr "发生意外错误" @@ -2640,11 +2643,11 @@ msgstr "不能包含特殊字符" msgid "The mobile phone number format is incorrect" msgstr "手机号格式不正确" -#: jumpserver/conf.py:303 +#: jumpserver/conf.py:304 msgid "Create account successfully" msgstr "创建账号成功" -#: jumpserver/conf.py:305 +#: jumpserver/conf.py:306 msgid "Your account has been created successfully" msgstr "你的账号已创建成功" @@ -3001,35 +3004,35 @@ msgstr "剪贴板复制粘贴" msgid "From ticket" msgstr "来自工单" -#: perms/notifications.py:17 +#: perms/notifications.py:18 msgid "You permed assets is about to expire" msgstr "你授权的资产即将到期" -#: perms/notifications.py:21 +#: perms/notifications.py:23 msgid "permed assets" msgstr "授权的资产" -#: perms/notifications.py:59 +#: perms/notifications.py:62 msgid "Asset permissions is about to expire" msgstr "资产授权规则将要过期" -#: perms/notifications.py:63 +#: perms/notifications.py:67 msgid "asset permissions of organization {}" msgstr "组织 ({}) 的资产授权" -#: perms/notifications.py:89 +#: perms/notifications.py:94 msgid "Your permed applications is about to expire" msgstr "你授权的应用即将过期" -#: perms/notifications.py:92 +#: perms/notifications.py:98 msgid "permed applications" msgstr "授权的应用" -#: perms/notifications.py:127 +#: perms/notifications.py:134 msgid "Application permissions is about to expire" msgstr "应用授权规则即将过期" -#: perms/notifications.py:130 +#: perms/notifications.py:137 msgid "application permissions of organization {}" msgstr "组织 ({}) 的应用授权" @@ -3085,14 +3088,13 @@ 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 3 days\n" +" The following %(item_type)s will expire in %(count)s days\n" " " msgstr "" "\n" -" 以下 %(item_type)s 即将在 3 天后过期\n" +" 以下 %(item_type)s 即将在 %(count)s 天后过期\n" " " #: perms/templates/perms/_msg_permed_items_expire.html:21 @@ -3103,6 +3105,10 @@ msgstr "如果有疑问或需求,请联系系统管理员" msgid "My applications" msgstr "我的应用" +#: perms/utils/asset/user_permission.py:620 rbac/tree.py:59 +msgid "My assets" +msgstr "我的资产" + #: rbac/api/role.py:34 msgid "Internal role, can't be destroy" msgstr "内部角色,不能删除" @@ -3111,7 +3117,7 @@ msgstr "内部角色,不能删除" msgid "The role has been bound to users, can't be destroy" msgstr "角色已绑定用户,不能删除" -#: rbac/api/role.py:45 +#: rbac/api/role.py:60 msgid "Internal role, can't be update" msgstr "内部角色,不能更新" @@ -3289,10 +3295,6 @@ msgstr "资产改密" msgid "Terminal setting" msgstr "终端设置" -#: rbac/tree.py:59 -msgid "My assets" -msgstr "我的资产" - #: rbac/tree.py:60 msgid "My apps" msgstr "我的应用" @@ -4221,7 +4223,7 @@ msgid "Enable database proxy" msgstr "启用数据库组件" #: settings/serializers/terminal.py:37 -msgid "Enable XRDP" +msgid "Enable Razor" msgstr "启用 XRDP 服务" #: settings/serializers/terminal.py:38 @@ -5622,27 +5624,27 @@ msgstr "最后更新密码日期" msgid "Need update password" msgstr "需要更新密码" -#: users/models/user.py:885 +#: users/models/user.py:890 msgid "Can invite user" msgstr "可以邀请用户" -#: users/models/user.py:886 +#: users/models/user.py:891 msgid "Can remove user" msgstr "可以移除用户" -#: users/models/user.py:887 +#: users/models/user.py:892 msgid "Can match user" msgstr "可以匹配用户" -#: users/models/user.py:896 +#: users/models/user.py:901 msgid "Administrator" msgstr "管理员" -#: users/models/user.py:899 +#: users/models/user.py:904 msgid "Administrator is the super user of system" msgstr "Administrator是初始的超级管理员" -#: users/models/user.py:924 +#: users/models/user.py:929 msgid "User password history" msgstr "用户密码历史" @@ -6737,6 +6739,9 @@ msgstr "旗舰版" msgid "Community edition" msgstr "社区版" +#~ msgid "Please verify your password first" +#~ msgstr "请检查密码" + #~ msgid "AccessKey ID" #~ msgstr "Access key ID" diff --git a/apps/locale/zh/LC_MESSAGES/djangojs.po b/apps/locale/zh/LC_MESSAGES/djangojs.po index 0cae14858..deddcbe25 100644 --- a/apps/locale/zh/LC_MESSAGES/djangojs.po +++ b/apps/locale/zh/LC_MESSAGES/djangojs.po @@ -3,7 +3,6 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" diff --git a/apps/perms/notifications.py b/apps/perms/notifications.py index 54d3f188e..4a7baf318 100644 --- a/apps/perms/notifications.py +++ b/apps/perms/notifications.py @@ -9,14 +9,16 @@ from notifications.notifications import UserMessage class PermedAssetsWillExpireUserMsg(UserMessage): - def __init__(self, user, assets): + def __init__(self, user, assets, day_count=0): super().__init__(user) self.assets = assets + self.count = day_count def get_html_msg(self) -> dict: subject = _("You permed assets is about to expire") context = { 'name': self.user.name, + 'day_count': self.day_count, 'items': [str(asset) for asset in self.assets], 'item_type': _("permed assets"), 'show_help': True @@ -38,10 +40,11 @@ class PermedAssetsWillExpireUserMsg(UserMessage): class AssetPermsWillExpireForOrgAdminMsg(UserMessage): - def __init__(self, user, perms, org): + def __init__(self, user, perms, org, day_count=0): super().__init__(user) self.perms = perms self.org = org + self.count = day_count def get_items_with_url(self): items_with_url = [] @@ -59,6 +62,7 @@ class AssetPermsWillExpireForOrgAdminMsg(UserMessage): subject = _("Asset permissions is about to expire") context = { 'name': self.user.name, + 'day_count': self.day_count, 'items_with_url': items_with_url, 'item_type': _('asset permissions of organization {}').format(self.org) } @@ -81,14 +85,16 @@ class AssetPermsWillExpireForOrgAdminMsg(UserMessage): class PermedAppsWillExpireUserMsg(UserMessage): - def __init__(self, user, apps): + def __init__(self, user, apps, day_count=0): super().__init__(user) self.apps = apps + self.count = day_count def get_html_msg(self) -> dict: subject = _("Your permed applications is about to expire") context = { 'name': self.user.name, + 'day_count': self.day_count, 'item_type': _('permed applications'), 'items': [str(app) for app in self.apps] } @@ -109,10 +115,11 @@ class PermedAppsWillExpireUserMsg(UserMessage): class AppPermsWillExpireForOrgAdminMsg(UserMessage): - def __init__(self, user, perms, org): + def __init__(self, user, perms, org, day_count=0): super().__init__(user) self.perms = perms self.org = org + self.count = day_count def get_items_with_url(self): items_with_url = [] diff --git a/apps/perms/tasks.py b/apps/perms/tasks.py index 2f5edafed..237eac5ac 100644 --- a/apps/perms/tasks.py +++ b/apps/perms/tasks.py @@ -63,8 +63,8 @@ def check_asset_permission_will_expired(): start = local_now() end = start + timedelta(days=3) - user_asset_mapper = defaultdict(set) - org_perm_mapper = defaultdict(set) + user_asset_remain_day_mapper = defaultdict(dict) + org_perm_remain_day_mapper = defaultdict(dict) asset_perms = AssetPermission.objects.filter( date_expired__gte=start, @@ -72,23 +72,35 @@ def check_asset_permission_will_expired(): ).distinct() for asset_perm in asset_perms: + date_expired = dt_parser(asset_perm.date_expired) + remain_days = (end - date_expired).days + + org = asset_perm.org # 资产授权按照组织分类 - org_perm_mapper[asset_perm.org].add(asset_perm) + if org in org_perm_remain_day_mapper[remain_days]: + org_perm_remain_day_mapper[remain_days][org].add(asset_perm) + else: + org_perm_remain_day_mapper[remain_days][org] = set() # 计算每个用户即将过期的资产 users = asset_perm.get_all_users() assets = asset_perm.get_all_assets() for u in users: - user_asset_mapper[u].update(assets) + if u in user_asset_remain_day_mapper[remain_days]: + user_asset_remain_day_mapper[remain_days][u].update(assets) + else: + user_asset_remain_day_mapper[remain_days][u] = set() - for user, assets in user_asset_mapper.items(): - PermedAssetsWillExpireUserMsg(user, assets).publish_async() + for day_count, user_asset_mapper in user_asset_remain_day_mapper.items(): + for user, assets in user_asset_mapper.items(): + PermedAssetsWillExpireUserMsg(user, assets, day_count).publish_async() - for org, perms in org_perm_mapper.items(): - org_admins = org.admins.all() - for org_admin in org_admins: - AssetPermsWillExpireForOrgAdminMsg(org_admin, perms, org).publish_async() + for day_count, org_perm_mapper in org_perm_remain_day_mapper.items(): + for org, perms in org_perm_mapper.items(): + org_admins = org.admins.all() + for org_admin in org_admins: + AssetPermsWillExpireForOrgAdminMsg(org_admin, perms, org, day_count).publish_async() @register_as_period_task(crontab='0 10 * * *') @@ -104,21 +116,33 @@ def check_app_permission_will_expired(): date_expired__lte=end ).distinct() - user_app_mapper = defaultdict(set) - org_perm_mapper = defaultdict(set) + user_app_remain_day_mapper = defaultdict(dict) + org_perm_remain_day_mapper = defaultdict(dict) for app_perm in app_perms: - org_perm_mapper[app_perm.org].add(app_perm) + date_expired = dt_parser(app_perm.date_expired) + remain_days = (end - date_expired).days + + org = app_perm.org + if org in org_perm_remain_day_mapper[remain_days]: + org_perm_remain_day_mapper[remain_days][org].add(app_perm) + else: + org_perm_remain_day_mapper[remain_days][org] = set() users = app_perm.get_all_users() apps = app_perm.applications.all() for u in users: - user_app_mapper[u].update(apps) + if u in user_app_remain_day_mapper[remain_days]: + user_app_remain_day_mapper[remain_days][u].update(apps) + else: + user_app_remain_day_mapper[remain_days][u] = set() - for user, apps in user_app_mapper.items(): - PermedAppsWillExpireUserMsg(user, apps).publish_async() + for day_count, user_app_mapper in user_app_remain_day_mapper.items(): + for user, apps in user_app_mapper.items(): + PermedAppsWillExpireUserMsg(user, apps, day_count).publish_async() - for org, perms in org_perm_mapper.items(): - org_admins = org.admins.all() - for org_admin in org_admins: - AppPermsWillExpireForOrgAdminMsg(org_admin, perms, org).publish_async() + for day_count, org_perm_mapper in org_perm_remain_day_mapper.items(): + for org, perms in org_perm_mapper.items(): + org_admins = org.admins.all() + for org_admin in org_admins: + AppPermsWillExpireForOrgAdminMsg(org_admin, perms, org, day_count).publish_async() diff --git a/apps/perms/templates/perms/_msg_item_permissions_expire.html b/apps/perms/templates/perms/_msg_item_permissions_expire.html index 139f958b3..aab2a3650 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 3 days + The following {{ item_type }} will expire in %(count)s 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 f50c59933..1e5ae7b18 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 3 days + The following {{ item_type }} will expire in %(count)s days {% endblocktranslate %}