From ae7dbbedcc46a34266bb003910f1ad79429cf6fa Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Fri, 21 Jun 2024 19:08:37 +0800 Subject: [PATCH] perf: Edit rbac perms (#13468) Co-authored-by: feng <1304903146@qq.com> Co-authored-by: feng626 <57284900+feng626@users.noreply.github.com> --- apps/accounts/migrations/0001_initial.py | 10 ++- .../migrations/0002_auto_20220616_0021.py | 7 +- .../models/automations/gather_account.py | 4 +- apps/i18n/core/en/LC_MESSAGES/django.po | 65 +++++++--------- apps/i18n/core/ja/LC_MESSAGES/django.po | 76 ++++++++++--------- apps/i18n/core/zh/LC_MESSAGES/django.po | 76 ++++++++++--------- apps/i18n/lina/en.json | 1 + apps/i18n/lina/zh.json | 1 + apps/rbac/const.py | 1 + apps/rbac/tree.py | 2 - apps/settings/api/email.py | 4 +- 11 files changed, 124 insertions(+), 123 deletions(-) diff --git a/apps/accounts/migrations/0001_initial.py b/apps/accounts/migrations/0001_initial.py index fcae87e48..044205a14 100644 --- a/apps/accounts/migrations/0001_initial.py +++ b/apps/accounts/migrations/0001_initial.py @@ -1,10 +1,12 @@ # Generated by Django 4.1.13 on 2024-05-09 03:16 +import uuid + +import simple_history.models +from django.db import migrations, models + import common.db.encoder import common.db.fields -from django.db import migrations, models -import simple_history.models -import uuid class Migration(migrations.Migration): @@ -147,7 +149,7 @@ class Migration(migrations.Migration): ('address_last_login', models.CharField(default='', max_length=39, verbose_name='Address login')), ], options={ - 'verbose_name': 'Gather account automation', + 'verbose_name': 'Gather asset accounts', 'ordering': ['asset'], }, ), diff --git a/apps/accounts/migrations/0002_auto_20220616_0021.py b/apps/accounts/migrations/0002_auto_20220616_0021.py index 5befcf815..5ac195d63 100644 --- a/apps/accounts/migrations/0002_auto_20220616_0021.py +++ b/apps/accounts/migrations/0002_auto_20220616_0021.py @@ -1,8 +1,9 @@ # Generated by Django 4.1.13 on 2024-05-09 03:16 -import common.db.fields -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models + +import common.db.fields class Migration(migrations.Migration): @@ -63,7 +64,7 @@ class Migration(migrations.Migration): ('is_sync_account', models.BooleanField(blank=True, default=False, verbose_name='Is sync account')), ], options={ - 'verbose_name': 'Gather asset accounts', + 'verbose_name': 'Gather account automation', }, bases=('accounts.accountbaseautomation',), ), diff --git a/apps/accounts/models/automations/gather_account.py b/apps/accounts/models/automations/gather_account.py index 96e83cbcb..6a40a0498 100644 --- a/apps/accounts/models/automations/gather_account.py +++ b/apps/accounts/models/automations/gather_account.py @@ -41,7 +41,7 @@ class GatheredAccount(JMSOrgBaseModel): Account.objects.bulk_create(account_objs) class Meta: - verbose_name = _('Gather account automation') + verbose_name = _("Gather asset accounts") unique_together = [ ('username', 'asset'), ] @@ -72,4 +72,4 @@ class GatherAccountsAutomation(AccountBaseAutomation): super().save(*args, **kwargs) class Meta: - verbose_name = _("Gather asset accounts") + verbose_name = _('Gather account automation') diff --git a/apps/i18n/core/en/LC_MESSAGES/django.po b/apps/i18n/core/en/LC_MESSAGES/django.po index 8f7b74541..fdfe82a7e 100644 --- a/apps/i18n/core/en/LC_MESSAGES/django.po +++ b/apps/i18n/core/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-20 16:39+0800\n" +"POT-Creation-Date: 2024-06-21 18:35+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -106,7 +106,7 @@ msgstr "" msgid "Skip" msgstr "" -#: accounts/const/account.py:33 audits/const.py:24 rbac/tree.py:267 +#: accounts/const/account.py:33 audits/const.py:24 rbac/tree.py:264 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6 msgid "Update" msgstr "" @@ -561,7 +561,8 @@ msgid "Address login" msgstr "" #: accounts/models/automations/gather_account.py:44 -msgid "Gather account automation" +#: accounts/tasks/gather_accounts.py:29 +msgid "Gather asset accounts" msgstr "" #: accounts/models/automations/gather_account.py:56 @@ -569,8 +570,7 @@ msgid "Is sync account" msgstr "Is sync account" #: accounts/models/automations/gather_account.py:75 -#: accounts/tasks/gather_accounts.py:29 -msgid "Gather asset accounts" +msgid "Gather account automation" msgstr "" #: accounts/models/automations/push_account.py:14 @@ -1546,7 +1546,7 @@ msgstr "" msgid "ChatGPT" msgstr "" -#: assets/const/host.py:12 rbac/tree.py:28 rbac/tree.py:67 +#: assets/const/host.py:12 rbac/tree.py:28 rbac/tree.py:66 #: xpack/plugins/cloud/const.py:69 msgid "Other" msgstr "" @@ -1583,7 +1583,7 @@ msgstr "" msgid "Any" msgstr "" -#: assets/const/protocol.py:81 rbac/tree.py:63 +#: assets/const/protocol.py:81 rbac/tree.py:62 #: settings/serializers/security.py:232 msgid "Security" msgstr "" @@ -2373,7 +2373,7 @@ msgstr "" #: audits/const.py:14 audits/const.py:25 #: authentication/templates/authentication/_access_key_modal.html:65 -#: rbac/tree.py:268 +#: rbac/tree.py:265 msgid "Delete" msgstr "" @@ -2399,7 +2399,7 @@ msgstr "" msgid "Rename dir" msgstr "" -#: audits/const.py:23 rbac/tree.py:266 terminal/api/session/session.py:274 +#: audits/const.py:23 rbac/tree.py:263 terminal/api/session/session.py:274 #: terminal/templates/terminal/_msg_command_warning.html:18 #: terminal/templates/terminal/_msg_session_sharing.html:10 #: xpack/plugins/cloud/manager.py:84 @@ -2408,7 +2408,7 @@ msgstr "" #: audits/const.py:26 #: authentication/templates/authentication/_access_key_modal.html:22 -#: rbac/tree.py:265 +#: rbac/tree.py:262 msgid "Create" msgstr "" @@ -2426,7 +2426,7 @@ msgstr "" msgid "Change password" msgstr "" -#: audits/const.py:35 rbac/tree.py:57 +#: audits/const.py:35 rbac/tree.py:56 msgid "Notifications" msgstr "" @@ -2460,7 +2460,7 @@ msgstr "" msgid "Login log" msgstr "" -#: audits/const.py:51 terminal/models/applet/host.py:144 +#: audits/const.py:51 rbac/tree.py:64 terminal/models/applet/host.py:144 #: terminal/models/component/task.py:22 #: xpack/plugins/cloud/serializers/account.py:77 msgid "Task" @@ -4921,72 +4921,64 @@ msgid "Asset change auth" msgstr "" #: rbac/tree.py:54 -msgid "Job center" -msgstr "" - -#: rbac/tree.py:55 msgid "My assets" msgstr "" -#: rbac/tree.py:56 +#: rbac/tree.py:55 msgid "App ops" msgstr "Ops" -#: rbac/tree.py:58 +#: rbac/tree.py:57 msgid "Features" msgstr "" -#: rbac/tree.py:59 settings/serializers/auth/base.py:10 +#: rbac/tree.py:58 settings/serializers/auth/base.py:10 msgid "Authentication" msgstr "" -#: rbac/tree.py:60 +#: rbac/tree.py:59 msgid "Storage" msgstr "" -#: rbac/tree.py:61 +#: rbac/tree.py:60 #, fuzzy #| msgid "SystemComponent" msgid "Components" msgstr "System Component" -#: rbac/tree.py:62 terminal/models/applet/applet.py:52 +#: rbac/tree.py:61 terminal/models/applet/applet.py:52 #: terminal/models/applet/applet.py:317 terminal/models/applet/host.py:30 #: terminal/serializers/applet.py:15 msgid "Applet" msgstr "" -#: rbac/tree.py:64 +#: rbac/tree.py:63 msgid "Appearance" msgstr "" -#: rbac/tree.py:65 -msgid "Tasks" -msgstr "" - -#: rbac/tree.py:66 xpack/plugins/license/meta.py:10 +#: rbac/tree.py:65 xpack/plugins/license/meta.py:10 #: xpack/plugins/license/models.py:144 msgid "License" msgstr "" -#: rbac/tree.py:157 +#: rbac/tree.py:154 msgid "App organizations" msgstr "Organizations" -#: rbac/tree.py:158 +#: rbac/tree.py:155 msgid "Ticket comment" msgstr "" -#: rbac/tree.py:159 settings/serializers/feature.py:113 +#: rbac/tree.py:156 settings/serializers/feature.py:113 #: settings/serializers/feature.py:115 tickets/models/ticket/general.py:305 msgid "Ticket" msgstr "" -#: rbac/tree.py:160 +#: rbac/tree.py:157 msgid "Common setting" msgstr "" -#: rbac/tree.py:161 +#: rbac/tree.py:158 msgid "View permission tree" msgstr "" @@ -5004,6 +4996,10 @@ msgstr "" msgid "Test mail sent to {}, please check" msgstr "" +#: settings/api/email.py:47 +msgid "Test smtp setting" +msgstr "" + #: settings/api/ldap.py:89 msgid "" "Users are not synchronized, please click the user synchronization button" @@ -9461,9 +9457,6 @@ msgstr "" #~ msgid "Average time taken" #~ msgstr "Average time taken" -#~ msgid "Terminal setting" -#~ msgstr "Terminal" - #, fuzzy #~| msgid "Terminal setting" #~ msgid "Interface setting" diff --git a/apps/i18n/core/ja/LC_MESSAGES/django.po b/apps/i18n/core/ja/LC_MESSAGES/django.po index 251ad61bd..2aefd0359 100644 --- a/apps/i18n/core/ja/LC_MESSAGES/django.po +++ b/apps/i18n/core/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: 2024-06-20 16:39+0800\n" +"POT-Creation-Date: 2024-06-21 18:35+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -106,7 +106,7 @@ msgstr "テンプレート" msgid "Skip" msgstr "スキップ" -#: accounts/const/account.py:33 audits/const.py:24 rbac/tree.py:267 +#: accounts/const/account.py:33 audits/const.py:24 rbac/tree.py:264 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6 msgid "Update" msgstr "更新" @@ -561,17 +561,17 @@ msgid "Address login" msgstr "最終ログインアドレス" #: accounts/models/automations/gather_account.py:44 -msgid "Gather account automation" -msgstr "自動収集アカウント" +#: accounts/tasks/gather_accounts.py:29 +msgid "Gather asset accounts" +msgstr "アカウントのコレクション" #: accounts/models/automations/gather_account.py:56 msgid "Is sync account" msgstr "アカウントを同期するかどうか" #: accounts/models/automations/gather_account.py:75 -#: accounts/tasks/gather_accounts.py:29 -msgid "Gather asset accounts" -msgstr "アカウントのコレクション" +msgid "Gather account automation" +msgstr "自動収集アカウント" #: accounts/models/automations/push_account.py:14 msgid "Triggers" @@ -1573,7 +1573,7 @@ msgstr "ファイアウォール" msgid "ChatGPT" msgstr "ChatGPT" -#: assets/const/host.py:12 rbac/tree.py:28 rbac/tree.py:67 +#: assets/const/host.py:12 rbac/tree.py:28 rbac/tree.py:66 #: xpack/plugins/cloud/const.py:69 msgid "Other" msgstr "その他" @@ -1613,7 +1613,7 @@ msgstr "コンソールセッションに接続" msgid "Any" msgstr "任意" -#: assets/const/protocol.py:81 rbac/tree.py:63 +#: assets/const/protocol.py:81 rbac/tree.py:62 #: settings/serializers/security.py:232 msgid "Security" msgstr "セキュリティ" @@ -2419,7 +2419,7 @@ msgstr "Rmdir" #: audits/const.py:14 audits/const.py:25 #: authentication/templates/authentication/_access_key_modal.html:65 -#: rbac/tree.py:268 +#: rbac/tree.py:265 msgid "Delete" msgstr "削除" @@ -2445,7 +2445,7 @@ msgstr "ダウンロード" msgid "Rename dir" msgstr "マップディレクトリ" -#: audits/const.py:23 rbac/tree.py:266 terminal/api/session/session.py:274 +#: audits/const.py:23 rbac/tree.py:263 terminal/api/session/session.py:274 #: terminal/templates/terminal/_msg_command_warning.html:18 #: terminal/templates/terminal/_msg_session_sharing.html:10 #: xpack/plugins/cloud/manager.py:84 @@ -2454,7 +2454,7 @@ msgstr "表示" #: audits/const.py:26 #: authentication/templates/authentication/_access_key_modal.html:22 -#: rbac/tree.py:265 +#: rbac/tree.py:262 msgid "Create" msgstr "作成" @@ -2472,7 +2472,7 @@ msgstr "ログイン" msgid "Change password" msgstr "パスワードを変更する" -#: audits/const.py:35 rbac/tree.py:57 +#: audits/const.py:35 rbac/tree.py:56 msgid "Notifications" msgstr "通知" @@ -2506,7 +2506,7 @@ msgstr "セッションログ" msgid "Login log" msgstr "ログインログ" -#: audits/const.py:51 terminal/models/applet/host.py:144 +#: audits/const.py:51 rbac/tree.py:64 terminal/models/applet/host.py:144 #: terminal/models/component/task.py:22 #: xpack/plugins/cloud/serializers/account.py:77 msgid "Task" @@ -5026,76 +5026,66 @@ msgid "Asset change auth" msgstr "資産の改ざん" #: rbac/tree.py:54 -msgid "Job center" -msgstr "タスクセンター" - -#: rbac/tree.py:55 msgid "My assets" msgstr "私の資産" -#: rbac/tree.py:56 +#: rbac/tree.py:55 msgid "App ops" msgstr "アプリ操作" -#: rbac/tree.py:58 +#: rbac/tree.py:57 #, fuzzy #| msgid "Feature" msgid "Features" msgstr "機能" -#: rbac/tree.py:59 settings/serializers/auth/base.py:10 +#: rbac/tree.py:58 settings/serializers/auth/base.py:10 msgid "Authentication" msgstr "認証" -#: rbac/tree.py:60 +#: rbac/tree.py:59 msgid "Storage" msgstr "" -#: rbac/tree.py:61 +#: rbac/tree.py:60 #, fuzzy #| msgid "Component" msgid "Components" msgstr "コンポーネント" -#: rbac/tree.py:62 terminal/models/applet/applet.py:52 +#: rbac/tree.py:61 terminal/models/applet/applet.py:52 #: terminal/models/applet/applet.py:317 terminal/models/applet/host.py:30 #: terminal/serializers/applet.py:15 msgid "Applet" msgstr "リモートアプリケーション" -#: rbac/tree.py:64 +#: rbac/tree.py:63 msgid "Appearance" msgstr "" -#: rbac/tree.py:65 -#, fuzzy -#| msgid "Task" -msgid "Tasks" -msgstr "タスク" - -#: rbac/tree.py:66 xpack/plugins/license/meta.py:10 +#: rbac/tree.py:65 xpack/plugins/license/meta.py:10 #: xpack/plugins/license/models.py:144 msgid "License" msgstr "ライセンス" -#: rbac/tree.py:157 +#: rbac/tree.py:154 msgid "App organizations" msgstr "アプリ組織" -#: rbac/tree.py:158 +#: rbac/tree.py:155 msgid "Ticket comment" msgstr "チケットコメント" -#: rbac/tree.py:159 settings/serializers/feature.py:113 +#: rbac/tree.py:156 settings/serializers/feature.py:113 #: settings/serializers/feature.py:115 tickets/models/ticket/general.py:305 msgid "Ticket" msgstr "チケット" -#: rbac/tree.py:160 +#: rbac/tree.py:157 msgid "Common setting" msgstr "共通設定" -#: rbac/tree.py:161 +#: rbac/tree.py:158 msgid "View permission tree" msgstr "権限ツリーの表示" @@ -5113,6 +5103,10 @@ msgstr "テストの成功" msgid "Test mail sent to {}, please check" msgstr "{}に送信されたテストメールを確認してください" +#: settings/api/email.py:47 +msgid "Test smtp setting" +msgstr "SMTP設定のテスト" + #: settings/api/ldap.py:89 msgid "" "Users are not synchronized, please click the user synchronization button" @@ -9719,6 +9713,14 @@ msgstr "エンタープライズプロフェッショナル版" msgid "Ultimate edition" msgstr "エンタープライズ・フラッグシップ・エディション" +#~ msgid "Job center" +#~ msgstr "タスクセンター" + +#, fuzzy +#~| msgid "Task" +#~ msgid "Tasks" +#~ msgstr "タスク" + #~ msgid "Average time taken" #~ msgstr "時を過ごす" diff --git a/apps/i18n/core/zh/LC_MESSAGES/django.po b/apps/i18n/core/zh/LC_MESSAGES/django.po index 685bacd0b..fe2185164 100644 --- a/apps/i18n/core/zh/LC_MESSAGES/django.po +++ b/apps/i18n/core/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: 2024-06-20 16:51+0800\n" +"POT-Creation-Date: 2024-06-21 18:35+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -105,7 +105,7 @@ msgstr "模板" msgid "Skip" msgstr "跳过" -#: accounts/const/account.py:33 audits/const.py:24 rbac/tree.py:267 +#: accounts/const/account.py:33 audits/const.py:24 rbac/tree.py:264 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6 msgid "Update" msgstr "更新" @@ -560,17 +560,17 @@ msgid "Address login" msgstr "最后登录地址" #: accounts/models/automations/gather_account.py:44 -msgid "Gather account automation" -msgstr "自动化收集账号" +#: accounts/tasks/gather_accounts.py:29 +msgid "Gather asset accounts" +msgstr "收集账号" #: accounts/models/automations/gather_account.py:56 msgid "Is sync account" msgstr "是否同步账号" #: accounts/models/automations/gather_account.py:75 -#: accounts/tasks/gather_accounts.py:29 -msgid "Gather asset accounts" -msgstr "收集账号" +msgid "Gather account automation" +msgstr "自动化收集账号" #: accounts/models/automations/push_account.py:14 msgid "Triggers" @@ -1563,7 +1563,7 @@ msgstr "防火墙" msgid "ChatGPT" msgstr "ChatGPT" -#: assets/const/host.py:12 rbac/tree.py:28 rbac/tree.py:67 +#: assets/const/host.py:12 rbac/tree.py:28 rbac/tree.py:66 #: xpack/plugins/cloud/const.py:69 msgid "Other" msgstr "其它" @@ -1602,7 +1602,7 @@ msgstr "连接到控制台会话" msgid "Any" msgstr "任意" -#: assets/const/protocol.py:81 rbac/tree.py:63 +#: assets/const/protocol.py:81 rbac/tree.py:62 #: settings/serializers/security.py:232 msgid "Security" msgstr "安全" @@ -2399,7 +2399,7 @@ msgstr "删除目录" #: audits/const.py:14 audits/const.py:25 #: authentication/templates/authentication/_access_key_modal.html:65 -#: rbac/tree.py:268 +#: rbac/tree.py:265 msgid "Delete" msgstr "删除" @@ -2425,7 +2425,7 @@ msgstr "下载" msgid "Rename dir" msgstr "映射目录" -#: audits/const.py:23 rbac/tree.py:266 terminal/api/session/session.py:274 +#: audits/const.py:23 rbac/tree.py:263 terminal/api/session/session.py:274 #: terminal/templates/terminal/_msg_command_warning.html:18 #: terminal/templates/terminal/_msg_session_sharing.html:10 #: xpack/plugins/cloud/manager.py:84 @@ -2434,7 +2434,7 @@ msgstr "查看" #: audits/const.py:26 #: authentication/templates/authentication/_access_key_modal.html:22 -#: rbac/tree.py:265 +#: rbac/tree.py:262 msgid "Create" msgstr "创建" @@ -2452,7 +2452,7 @@ msgstr "登录" msgid "Change password" msgstr "改密" -#: audits/const.py:35 rbac/tree.py:57 +#: audits/const.py:35 rbac/tree.py:56 msgid "Notifications" msgstr "通知" @@ -2486,7 +2486,7 @@ msgstr "会话日志" msgid "Login log" msgstr "登录日志" -#: audits/const.py:51 terminal/models/applet/host.py:144 +#: audits/const.py:51 rbac/tree.py:64 terminal/models/applet/host.py:144 #: terminal/models/component/task.py:22 #: xpack/plugins/cloud/serializers/account.py:77 msgid "Task" @@ -4967,76 +4967,66 @@ msgid "Asset change auth" msgstr "资产改密" #: rbac/tree.py:54 -msgid "Job center" -msgstr "任务中心" - -#: rbac/tree.py:55 msgid "My assets" msgstr "我的资产" -#: rbac/tree.py:56 +#: rbac/tree.py:55 msgid "App ops" msgstr "作业中心" -#: rbac/tree.py:58 +#: rbac/tree.py:57 #, fuzzy #| msgid "Feature" msgid "Features" msgstr "功能" -#: rbac/tree.py:59 settings/serializers/auth/base.py:10 +#: rbac/tree.py:58 settings/serializers/auth/base.py:10 msgid "Authentication" msgstr "认证" -#: rbac/tree.py:60 +#: rbac/tree.py:59 msgid "Storage" msgstr "存储" -#: rbac/tree.py:61 +#: rbac/tree.py:60 #, fuzzy #| msgid "Component" msgid "Components" msgstr "组件" -#: rbac/tree.py:62 terminal/models/applet/applet.py:52 +#: rbac/tree.py:61 terminal/models/applet/applet.py:52 #: terminal/models/applet/applet.py:317 terminal/models/applet/host.py:30 #: terminal/serializers/applet.py:15 msgid "Applet" msgstr "远程应用" -#: rbac/tree.py:64 +#: rbac/tree.py:63 msgid "Appearance" msgstr "外貌" -#: rbac/tree.py:65 -#, fuzzy -#| msgid "Task" -msgid "Tasks" -msgstr "任务" - -#: rbac/tree.py:66 xpack/plugins/license/meta.py:10 +#: rbac/tree.py:65 xpack/plugins/license/meta.py:10 #: xpack/plugins/license/models.py:144 msgid "License" msgstr "许可证" -#: rbac/tree.py:157 +#: rbac/tree.py:154 msgid "App organizations" msgstr "组织管理" -#: rbac/tree.py:158 +#: rbac/tree.py:155 msgid "Ticket comment" msgstr "工单评论" -#: rbac/tree.py:159 settings/serializers/feature.py:113 +#: rbac/tree.py:156 settings/serializers/feature.py:113 #: settings/serializers/feature.py:115 tickets/models/ticket/general.py:305 msgid "Ticket" msgstr "工单" -#: rbac/tree.py:160 +#: rbac/tree.py:157 msgid "Common setting" msgstr "一般设置" -#: rbac/tree.py:161 +#: rbac/tree.py:158 msgid "View permission tree" msgstr "查看授权树" @@ -5054,6 +5044,10 @@ msgstr "测试成功" msgid "Test mail sent to {}, please check" msgstr "邮件已经发送{}, 请检查" +#: settings/api/email.py:47 +msgid "Test smtp setting" +msgstr "测试 smtp 设置" + #: settings/api/ldap.py:89 msgid "" "Users are not synchronized, please click the user synchronization button" @@ -9606,6 +9600,14 @@ msgstr "企业专业版" msgid "Ultimate edition" msgstr "企业旗舰版" +#~ msgid "Job center" +#~ msgstr "任务中心" + +#, fuzzy +#~| msgid "Task" +#~ msgid "Tasks" +#~ msgstr "任务" + #~ msgid "Average time taken" #~ msgstr "平均耗时" diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index 1bda42a70..cc10ea5cc 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -1341,5 +1341,6 @@ "VaultHCPMountPoint": "The mount point of the Vault server, default is jumpserver", "WeChat": "WeChat", "SuEnabled": "Enabled su", + "Gateway": "Gateway", "StopLogOutput": "Task Canceled: The current task (currentTaskId) has been manually stopped. Since the progress of each task varies, the following is the final execution result of the task. A failed execution indicates that the task has been successfully stopped." } \ No newline at end of file diff --git a/apps/i18n/lina/zh.json b/apps/i18n/lina/zh.json index 5706be59a..b18af2411 100644 --- a/apps/i18n/lina/zh.json +++ b/apps/i18n/lina/zh.json @@ -1340,5 +1340,6 @@ "PublicIp": "公有 IP", "PrivateIp": "私有 IP", "WeChat": "微信", + "Gateway": "网关", "StopLogOutput": "Task Canceled:当前任务(currentTaskId)已手动停止,由于每个任务的执行进度不一样,下面是任务最终的执行结果,执行失败表示已成功停止任务执行。" } \ No newline at end of file diff --git a/apps/rbac/const.py b/apps/rbac/const.py index 015bee529..7aebc24f5 100644 --- a/apps/rbac/const.py +++ b/apps/rbac/const.py @@ -66,6 +66,7 @@ exclude_permissions = ( ('accounts', 'account', 'change', 'accountsecret'), ('accounts', 'account', 'view', 'historyaccount'), ('accounts', 'account', 'view', 'historyaccountsecret'), + ('accounts', 'accounttemplate', 'change_accounttemplatesecret', 'accounttemplate'), ('perms', 'userassetgrantedtreenoderelation', '*', '*'), ('perms', 'permedaccount', '*', '*'), diff --git a/apps/rbac/tree.py b/apps/rbac/tree.py index 9deff56c2..8e0fa07af 100644 --- a/apps/rbac/tree.py +++ b/apps/rbac/tree.py @@ -98,7 +98,6 @@ special_pid_mapper = { "accounts.view_changesecretrecord": "asset_change_plan_node", 'audits.ftplog': 'terminal', 'perms.view_myassets': 'my_assets', - 'ops.job': 'operation_center', 'ops.adhoc': 'operation_center', 'ops.playbook': 'operation_center', @@ -133,7 +132,6 @@ special_setting_pid_mapper = { 'terminal.applethostdeployment': 'remote_app', "settings.change_terminal": "components", "terminal.terminal": "components", - "terminal.view_terminal": "components", "terminal.endpoint": "components", "terminal.endpointrule": "components", "terminal.status": "components", diff --git a/apps/settings/api/email.py b/apps/settings/api/email.py index 3790752d5..f36cb47d5 100644 --- a/apps/settings/api/email.py +++ b/apps/settings/api/email.py @@ -8,8 +8,8 @@ from django.core.mail import send_mail from django.utils.translation import gettext_lazy as _ from rest_framework.views import Response, APIView -from common.utils import get_logger from common.tasks import get_email_connection as get_connection +from common.utils import get_logger from .. import serializers logger = get_logger(__file__) @@ -44,7 +44,7 @@ class MailTestingAPI(APIView): # setattr(settings, k, v) try: subject = settings.EMAIL_SUBJECT_PREFIX or '' + "Test" - message = "Test smtp setting" + message = _("Test smtp setting") email_from = email_from or email_host_user email_recipient = email_recipient or email_from connection = get_connection(