perf: Edit rbac perms (#13468)

Co-authored-by: feng <1304903146@qq.com>
Co-authored-by: feng626 <57284900+feng626@users.noreply.github.com>
This commit is contained in:
fit2bot 2024-06-21 19:08:37 +08:00 committed by GitHub
parent 407a77f61b
commit ae7dbbedcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 124 additions and 123 deletions

View File

@ -1,10 +1,12 @@
# Generated by Django 4.1.13 on 2024-05-09 03:16 # 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.encoder
import common.db.fields import common.db.fields
from django.db import migrations, models
import simple_history.models
import uuid
class Migration(migrations.Migration): 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')), ('address_last_login', models.CharField(default='', max_length=39, verbose_name='Address login')),
], ],
options={ options={
'verbose_name': 'Gather account automation', 'verbose_name': 'Gather asset accounts',
'ordering': ['asset'], 'ordering': ['asset'],
}, },
), ),

View File

@ -1,8 +1,9 @@
# Generated by Django 4.1.13 on 2024-05-09 03:16 # 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 import django.db.models.deletion
from django.db import migrations, models
import common.db.fields
class Migration(migrations.Migration): 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')), ('is_sync_account', models.BooleanField(blank=True, default=False, verbose_name='Is sync account')),
], ],
options={ options={
'verbose_name': 'Gather asset accounts', 'verbose_name': 'Gather account automation',
}, },
bases=('accounts.accountbaseautomation',), bases=('accounts.accountbaseautomation',),
), ),

View File

@ -41,7 +41,7 @@ class GatheredAccount(JMSOrgBaseModel):
Account.objects.bulk_create(account_objs) Account.objects.bulk_create(account_objs)
class Meta: class Meta:
verbose_name = _('Gather account automation') verbose_name = _("Gather asset accounts")
unique_together = [ unique_together = [
('username', 'asset'), ('username', 'asset'),
] ]
@ -72,4 +72,4 @@ class GatherAccountsAutomation(AccountBaseAutomation):
super().save(*args, **kwargs) super().save(*args, **kwargs)
class Meta: class Meta:
verbose_name = _("Gather asset accounts") verbose_name = _('Gather account automation')

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -106,7 +106,7 @@ msgstr ""
msgid "Skip" msgid "Skip"
msgstr "" 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 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6
msgid "Update" msgid "Update"
msgstr "" msgstr ""
@ -561,7 +561,8 @@ msgid "Address login"
msgstr "" msgstr ""
#: accounts/models/automations/gather_account.py:44 #: accounts/models/automations/gather_account.py:44
msgid "Gather account automation" #: accounts/tasks/gather_accounts.py:29
msgid "Gather asset accounts"
msgstr "" msgstr ""
#: accounts/models/automations/gather_account.py:56 #: accounts/models/automations/gather_account.py:56
@ -569,8 +570,7 @@ msgid "Is sync account"
msgstr "Is sync account" msgstr "Is sync account"
#: accounts/models/automations/gather_account.py:75 #: accounts/models/automations/gather_account.py:75
#: accounts/tasks/gather_accounts.py:29 msgid "Gather account automation"
msgid "Gather asset accounts"
msgstr "" msgstr ""
#: accounts/models/automations/push_account.py:14 #: accounts/models/automations/push_account.py:14
@ -1546,7 +1546,7 @@ msgstr ""
msgid "ChatGPT" msgid "ChatGPT"
msgstr "" 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 #: xpack/plugins/cloud/const.py:69
msgid "Other" msgid "Other"
msgstr "" msgstr ""
@ -1583,7 +1583,7 @@ msgstr ""
msgid "Any" msgid "Any"
msgstr "" msgstr ""
#: assets/const/protocol.py:81 rbac/tree.py:63 #: assets/const/protocol.py:81 rbac/tree.py:62
#: settings/serializers/security.py:232 #: settings/serializers/security.py:232
msgid "Security" msgid "Security"
msgstr "" msgstr ""
@ -2373,7 +2373,7 @@ msgstr ""
#: audits/const.py:14 audits/const.py:25 #: audits/const.py:14 audits/const.py:25
#: authentication/templates/authentication/_access_key_modal.html:65 #: authentication/templates/authentication/_access_key_modal.html:65
#: rbac/tree.py:268 #: rbac/tree.py:265
msgid "Delete" msgid "Delete"
msgstr "" msgstr ""
@ -2399,7 +2399,7 @@ msgstr ""
msgid "Rename dir" msgid "Rename dir"
msgstr "" 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_command_warning.html:18
#: terminal/templates/terminal/_msg_session_sharing.html:10 #: terminal/templates/terminal/_msg_session_sharing.html:10
#: xpack/plugins/cloud/manager.py:84 #: xpack/plugins/cloud/manager.py:84
@ -2408,7 +2408,7 @@ msgstr ""
#: audits/const.py:26 #: audits/const.py:26
#: authentication/templates/authentication/_access_key_modal.html:22 #: authentication/templates/authentication/_access_key_modal.html:22
#: rbac/tree.py:265 #: rbac/tree.py:262
msgid "Create" msgid "Create"
msgstr "" msgstr ""
@ -2426,7 +2426,7 @@ msgstr ""
msgid "Change password" msgid "Change password"
msgstr "" msgstr ""
#: audits/const.py:35 rbac/tree.py:57 #: audits/const.py:35 rbac/tree.py:56
msgid "Notifications" msgid "Notifications"
msgstr "" msgstr ""
@ -2460,7 +2460,7 @@ msgstr ""
msgid "Login log" msgid "Login log"
msgstr "" 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 #: terminal/models/component/task.py:22
#: xpack/plugins/cloud/serializers/account.py:77 #: xpack/plugins/cloud/serializers/account.py:77
msgid "Task" msgid "Task"
@ -4921,72 +4921,64 @@ msgid "Asset change auth"
msgstr "" msgstr ""
#: rbac/tree.py:54 #: rbac/tree.py:54
msgid "Job center"
msgstr ""
#: rbac/tree.py:55
msgid "My assets" msgid "My assets"
msgstr "" msgstr ""
#: rbac/tree.py:56 #: rbac/tree.py:55
msgid "App ops" msgid "App ops"
msgstr "Ops" msgstr "Ops"
#: rbac/tree.py:58 #: rbac/tree.py:57
msgid "Features" msgid "Features"
msgstr "" msgstr ""
#: rbac/tree.py:59 settings/serializers/auth/base.py:10 #: rbac/tree.py:58 settings/serializers/auth/base.py:10
msgid "Authentication" msgid "Authentication"
msgstr "" msgstr ""
#: rbac/tree.py:60 #: rbac/tree.py:59
msgid "Storage" msgid "Storage"
msgstr "" msgstr ""
#: rbac/tree.py:61 #: rbac/tree.py:60
#, fuzzy #, fuzzy
#| msgid "SystemComponent" #| msgid "SystemComponent"
msgid "Components" msgid "Components"
msgstr "System Component" 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/models/applet/applet.py:317 terminal/models/applet/host.py:30
#: terminal/serializers/applet.py:15 #: terminal/serializers/applet.py:15
msgid "Applet" msgid "Applet"
msgstr "" msgstr ""
#: rbac/tree.py:64 #: rbac/tree.py:63
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#: rbac/tree.py:65 #: rbac/tree.py:65 xpack/plugins/license/meta.py:10
msgid "Tasks"
msgstr ""
#: rbac/tree.py:66 xpack/plugins/license/meta.py:10
#: xpack/plugins/license/models.py:144 #: xpack/plugins/license/models.py:144
msgid "License" msgid "License"
msgstr "" msgstr ""
#: rbac/tree.py:157 #: rbac/tree.py:154
msgid "App organizations" msgid "App organizations"
msgstr "Organizations" msgstr "Organizations"
#: rbac/tree.py:158 #: rbac/tree.py:155
msgid "Ticket comment" msgid "Ticket comment"
msgstr "" 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 #: settings/serializers/feature.py:115 tickets/models/ticket/general.py:305
msgid "Ticket" msgid "Ticket"
msgstr "" msgstr ""
#: rbac/tree.py:160 #: rbac/tree.py:157
msgid "Common setting" msgid "Common setting"
msgstr "" msgstr ""
#: rbac/tree.py:161 #: rbac/tree.py:158
msgid "View permission tree" msgid "View permission tree"
msgstr "" msgstr ""
@ -5004,6 +4996,10 @@ msgstr ""
msgid "Test mail sent to {}, please check" msgid "Test mail sent to {}, please check"
msgstr "" msgstr ""
#: settings/api/email.py:47
msgid "Test smtp setting"
msgstr ""
#: settings/api/ldap.py:89 #: settings/api/ldap.py:89
msgid "" msgid ""
"Users are not synchronized, please click the user synchronization button" "Users are not synchronized, please click the user synchronization button"
@ -9461,9 +9457,6 @@ msgstr ""
#~ msgid "Average time taken" #~ msgid "Average time taken"
#~ msgstr "Average time taken" #~ msgstr "Average time taken"
#~ msgid "Terminal setting"
#~ msgstr "Terminal"
#, fuzzy #, fuzzy
#~| msgid "Terminal setting" #~| msgid "Terminal setting"
#~ msgid "Interface setting" #~ msgid "Interface setting"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -106,7 +106,7 @@ msgstr "テンプレート"
msgid "Skip" msgid "Skip"
msgstr "スキップ" 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 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6
msgid "Update" msgid "Update"
msgstr "更新" msgstr "更新"
@ -561,17 +561,17 @@ msgid "Address login"
msgstr "最終ログインアドレス" msgstr "最終ログインアドレス"
#: accounts/models/automations/gather_account.py:44 #: accounts/models/automations/gather_account.py:44
msgid "Gather account automation" #: accounts/tasks/gather_accounts.py:29
msgstr "自動収集アカウント" msgid "Gather asset accounts"
msgstr "アカウントのコレクション"
#: accounts/models/automations/gather_account.py:56 #: accounts/models/automations/gather_account.py:56
msgid "Is sync account" msgid "Is sync account"
msgstr "アカウントを同期するかどうか" msgstr "アカウントを同期するかどうか"
#: accounts/models/automations/gather_account.py:75 #: accounts/models/automations/gather_account.py:75
#: accounts/tasks/gather_accounts.py:29 msgid "Gather account automation"
msgid "Gather asset accounts" msgstr "自動収集アカウント"
msgstr "アカウントのコレクション"
#: accounts/models/automations/push_account.py:14 #: accounts/models/automations/push_account.py:14
msgid "Triggers" msgid "Triggers"
@ -1573,7 +1573,7 @@ msgstr "ファイアウォール"
msgid "ChatGPT" msgid "ChatGPT"
msgstr "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 #: xpack/plugins/cloud/const.py:69
msgid "Other" msgid "Other"
msgstr "その他" msgstr "その他"
@ -1613,7 +1613,7 @@ msgstr "コンソールセッションに接続"
msgid "Any" msgid "Any"
msgstr "任意" msgstr "任意"
#: assets/const/protocol.py:81 rbac/tree.py:63 #: assets/const/protocol.py:81 rbac/tree.py:62
#: settings/serializers/security.py:232 #: settings/serializers/security.py:232
msgid "Security" msgid "Security"
msgstr "セキュリティ" msgstr "セキュリティ"
@ -2419,7 +2419,7 @@ msgstr "Rmdir"
#: audits/const.py:14 audits/const.py:25 #: audits/const.py:14 audits/const.py:25
#: authentication/templates/authentication/_access_key_modal.html:65 #: authentication/templates/authentication/_access_key_modal.html:65
#: rbac/tree.py:268 #: rbac/tree.py:265
msgid "Delete" msgid "Delete"
msgstr "削除" msgstr "削除"
@ -2445,7 +2445,7 @@ msgstr "ダウンロード"
msgid "Rename dir" msgid "Rename dir"
msgstr "マップディレクトリ" 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_command_warning.html:18
#: terminal/templates/terminal/_msg_session_sharing.html:10 #: terminal/templates/terminal/_msg_session_sharing.html:10
#: xpack/plugins/cloud/manager.py:84 #: xpack/plugins/cloud/manager.py:84
@ -2454,7 +2454,7 @@ msgstr "表示"
#: audits/const.py:26 #: audits/const.py:26
#: authentication/templates/authentication/_access_key_modal.html:22 #: authentication/templates/authentication/_access_key_modal.html:22
#: rbac/tree.py:265 #: rbac/tree.py:262
msgid "Create" msgid "Create"
msgstr "作成" msgstr "作成"
@ -2472,7 +2472,7 @@ msgstr "ログイン"
msgid "Change password" msgid "Change password"
msgstr "パスワードを変更する" msgstr "パスワードを変更する"
#: audits/const.py:35 rbac/tree.py:57 #: audits/const.py:35 rbac/tree.py:56
msgid "Notifications" msgid "Notifications"
msgstr "通知" msgstr "通知"
@ -2506,7 +2506,7 @@ msgstr "セッションログ"
msgid "Login log" msgid "Login log"
msgstr "ログインログ" 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 #: terminal/models/component/task.py:22
#: xpack/plugins/cloud/serializers/account.py:77 #: xpack/plugins/cloud/serializers/account.py:77
msgid "Task" msgid "Task"
@ -5026,76 +5026,66 @@ msgid "Asset change auth"
msgstr "資産の改ざん" msgstr "資産の改ざん"
#: rbac/tree.py:54 #: rbac/tree.py:54
msgid "Job center"
msgstr "タスクセンター"
#: rbac/tree.py:55
msgid "My assets" msgid "My assets"
msgstr "私の資産" msgstr "私の資産"
#: rbac/tree.py:56 #: rbac/tree.py:55
msgid "App ops" msgid "App ops"
msgstr "アプリ操作" msgstr "アプリ操作"
#: rbac/tree.py:58 #: rbac/tree.py:57
#, fuzzy #, fuzzy
#| msgid "Feature" #| msgid "Feature"
msgid "Features" msgid "Features"
msgstr "機能" msgstr "機能"
#: rbac/tree.py:59 settings/serializers/auth/base.py:10 #: rbac/tree.py:58 settings/serializers/auth/base.py:10
msgid "Authentication" msgid "Authentication"
msgstr "認証" msgstr "認証"
#: rbac/tree.py:60 #: rbac/tree.py:59
msgid "Storage" msgid "Storage"
msgstr "" msgstr ""
#: rbac/tree.py:61 #: rbac/tree.py:60
#, fuzzy #, fuzzy
#| msgid "Component" #| msgid "Component"
msgid "Components" msgid "Components"
msgstr "コンポーネント" 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/models/applet/applet.py:317 terminal/models/applet/host.py:30
#: terminal/serializers/applet.py:15 #: terminal/serializers/applet.py:15
msgid "Applet" msgid "Applet"
msgstr "リモートアプリケーション" msgstr "リモートアプリケーション"
#: rbac/tree.py:64 #: rbac/tree.py:63
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#: rbac/tree.py:65 #: rbac/tree.py:65 xpack/plugins/license/meta.py:10
#, fuzzy
#| msgid "Task"
msgid "Tasks"
msgstr "タスク"
#: rbac/tree.py:66 xpack/plugins/license/meta.py:10
#: xpack/plugins/license/models.py:144 #: xpack/plugins/license/models.py:144
msgid "License" msgid "License"
msgstr "ライセンス" msgstr "ライセンス"
#: rbac/tree.py:157 #: rbac/tree.py:154
msgid "App organizations" msgid "App organizations"
msgstr "アプリ組織" msgstr "アプリ組織"
#: rbac/tree.py:158 #: rbac/tree.py:155
msgid "Ticket comment" msgid "Ticket comment"
msgstr "チケットコメント" 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 #: settings/serializers/feature.py:115 tickets/models/ticket/general.py:305
msgid "Ticket" msgid "Ticket"
msgstr "チケット" msgstr "チケット"
#: rbac/tree.py:160 #: rbac/tree.py:157
msgid "Common setting" msgid "Common setting"
msgstr "共通設定" msgstr "共通設定"
#: rbac/tree.py:161 #: rbac/tree.py:158
msgid "View permission tree" msgid "View permission tree"
msgstr "権限ツリーの表示" msgstr "権限ツリーの表示"
@ -5113,6 +5103,10 @@ msgstr "テストの成功"
msgid "Test mail sent to {}, please check" msgid "Test mail sent to {}, please check"
msgstr "{}に送信されたテストメールを確認してください" msgstr "{}に送信されたテストメールを確認してください"
#: settings/api/email.py:47
msgid "Test smtp setting"
msgstr "SMTP設定のテスト"
#: settings/api/ldap.py:89 #: settings/api/ldap.py:89
msgid "" msgid ""
"Users are not synchronized, please click the user synchronization button" "Users are not synchronized, please click the user synchronization button"
@ -9719,6 +9713,14 @@ msgstr "エンタープライズプロフェッショナル版"
msgid "Ultimate edition" msgid "Ultimate edition"
msgstr "エンタープライズ・フラッグシップ・エディション" msgstr "エンタープライズ・フラッグシップ・エディション"
#~ msgid "Job center"
#~ msgstr "タスクセンター"
#, fuzzy
#~| msgid "Task"
#~ msgid "Tasks"
#~ msgstr "タスク"
#~ msgid "Average time taken" #~ msgid "Average time taken"
#~ msgstr "時を過ごす" #~ msgstr "時を過ごす"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n" "Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 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" "PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n" "Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n" "Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -105,7 +105,7 @@ msgstr "模板"
msgid "Skip" msgid "Skip"
msgstr "跳过" 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 #: templates/_csv_import_export.html:18 templates/_csv_update_modal.html:6
msgid "Update" msgid "Update"
msgstr "更新" msgstr "更新"
@ -560,17 +560,17 @@ msgid "Address login"
msgstr "最后登录地址" msgstr "最后登录地址"
#: accounts/models/automations/gather_account.py:44 #: accounts/models/automations/gather_account.py:44
msgid "Gather account automation" #: accounts/tasks/gather_accounts.py:29
msgstr "自动化收集账号" msgid "Gather asset accounts"
msgstr "收集账号"
#: accounts/models/automations/gather_account.py:56 #: accounts/models/automations/gather_account.py:56
msgid "Is sync account" msgid "Is sync account"
msgstr "是否同步账号" msgstr "是否同步账号"
#: accounts/models/automations/gather_account.py:75 #: accounts/models/automations/gather_account.py:75
#: accounts/tasks/gather_accounts.py:29 msgid "Gather account automation"
msgid "Gather asset accounts" msgstr "自动化收集账号"
msgstr "收集账号"
#: accounts/models/automations/push_account.py:14 #: accounts/models/automations/push_account.py:14
msgid "Triggers" msgid "Triggers"
@ -1563,7 +1563,7 @@ msgstr "防火墙"
msgid "ChatGPT" msgid "ChatGPT"
msgstr "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 #: xpack/plugins/cloud/const.py:69
msgid "Other" msgid "Other"
msgstr "其它" msgstr "其它"
@ -1602,7 +1602,7 @@ msgstr "连接到控制台会话"
msgid "Any" msgid "Any"
msgstr "任意" msgstr "任意"
#: assets/const/protocol.py:81 rbac/tree.py:63 #: assets/const/protocol.py:81 rbac/tree.py:62
#: settings/serializers/security.py:232 #: settings/serializers/security.py:232
msgid "Security" msgid "Security"
msgstr "安全" msgstr "安全"
@ -2399,7 +2399,7 @@ msgstr "删除目录"
#: audits/const.py:14 audits/const.py:25 #: audits/const.py:14 audits/const.py:25
#: authentication/templates/authentication/_access_key_modal.html:65 #: authentication/templates/authentication/_access_key_modal.html:65
#: rbac/tree.py:268 #: rbac/tree.py:265
msgid "Delete" msgid "Delete"
msgstr "删除" msgstr "删除"
@ -2425,7 +2425,7 @@ msgstr "下载"
msgid "Rename dir" msgid "Rename dir"
msgstr "映射目录" 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_command_warning.html:18
#: terminal/templates/terminal/_msg_session_sharing.html:10 #: terminal/templates/terminal/_msg_session_sharing.html:10
#: xpack/plugins/cloud/manager.py:84 #: xpack/plugins/cloud/manager.py:84
@ -2434,7 +2434,7 @@ msgstr "查看"
#: audits/const.py:26 #: audits/const.py:26
#: authentication/templates/authentication/_access_key_modal.html:22 #: authentication/templates/authentication/_access_key_modal.html:22
#: rbac/tree.py:265 #: rbac/tree.py:262
msgid "Create" msgid "Create"
msgstr "创建" msgstr "创建"
@ -2452,7 +2452,7 @@ msgstr "登录"
msgid "Change password" msgid "Change password"
msgstr "改密" msgstr "改密"
#: audits/const.py:35 rbac/tree.py:57 #: audits/const.py:35 rbac/tree.py:56
msgid "Notifications" msgid "Notifications"
msgstr "通知" msgstr "通知"
@ -2486,7 +2486,7 @@ msgstr "会话日志"
msgid "Login log" msgid "Login log"
msgstr "登录日志" 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 #: terminal/models/component/task.py:22
#: xpack/plugins/cloud/serializers/account.py:77 #: xpack/plugins/cloud/serializers/account.py:77
msgid "Task" msgid "Task"
@ -4967,76 +4967,66 @@ msgid "Asset change auth"
msgstr "资产改密" msgstr "资产改密"
#: rbac/tree.py:54 #: rbac/tree.py:54
msgid "Job center"
msgstr "任务中心"
#: rbac/tree.py:55
msgid "My assets" msgid "My assets"
msgstr "我的资产" msgstr "我的资产"
#: rbac/tree.py:56 #: rbac/tree.py:55
msgid "App ops" msgid "App ops"
msgstr "作业中心" msgstr "作业中心"
#: rbac/tree.py:58 #: rbac/tree.py:57
#, fuzzy #, fuzzy
#| msgid "Feature" #| msgid "Feature"
msgid "Features" msgid "Features"
msgstr "功能" msgstr "功能"
#: rbac/tree.py:59 settings/serializers/auth/base.py:10 #: rbac/tree.py:58 settings/serializers/auth/base.py:10
msgid "Authentication" msgid "Authentication"
msgstr "认证" msgstr "认证"
#: rbac/tree.py:60 #: rbac/tree.py:59
msgid "Storage" msgid "Storage"
msgstr "存储" msgstr "存储"
#: rbac/tree.py:61 #: rbac/tree.py:60
#, fuzzy #, fuzzy
#| msgid "Component" #| msgid "Component"
msgid "Components" msgid "Components"
msgstr "组件" 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/models/applet/applet.py:317 terminal/models/applet/host.py:30
#: terminal/serializers/applet.py:15 #: terminal/serializers/applet.py:15
msgid "Applet" msgid "Applet"
msgstr "远程应用" msgstr "远程应用"
#: rbac/tree.py:64 #: rbac/tree.py:63
msgid "Appearance" msgid "Appearance"
msgstr "外貌" msgstr "外貌"
#: rbac/tree.py:65 #: rbac/tree.py:65 xpack/plugins/license/meta.py:10
#, fuzzy
#| msgid "Task"
msgid "Tasks"
msgstr "任务"
#: rbac/tree.py:66 xpack/plugins/license/meta.py:10
#: xpack/plugins/license/models.py:144 #: xpack/plugins/license/models.py:144
msgid "License" msgid "License"
msgstr "许可证" msgstr "许可证"
#: rbac/tree.py:157 #: rbac/tree.py:154
msgid "App organizations" msgid "App organizations"
msgstr "组织管理" msgstr "组织管理"
#: rbac/tree.py:158 #: rbac/tree.py:155
msgid "Ticket comment" msgid "Ticket comment"
msgstr "工单评论" 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 #: settings/serializers/feature.py:115 tickets/models/ticket/general.py:305
msgid "Ticket" msgid "Ticket"
msgstr "工单" msgstr "工单"
#: rbac/tree.py:160 #: rbac/tree.py:157
msgid "Common setting" msgid "Common setting"
msgstr "一般设置" msgstr "一般设置"
#: rbac/tree.py:161 #: rbac/tree.py:158
msgid "View permission tree" msgid "View permission tree"
msgstr "查看授权树" msgstr "查看授权树"
@ -5054,6 +5044,10 @@ msgstr "测试成功"
msgid "Test mail sent to {}, please check" msgid "Test mail sent to {}, please check"
msgstr "邮件已经发送{}, 请检查" msgstr "邮件已经发送{}, 请检查"
#: settings/api/email.py:47
msgid "Test smtp setting"
msgstr "测试 smtp 设置"
#: settings/api/ldap.py:89 #: settings/api/ldap.py:89
msgid "" msgid ""
"Users are not synchronized, please click the user synchronization button" "Users are not synchronized, please click the user synchronization button"
@ -9606,6 +9600,14 @@ msgstr "企业专业版"
msgid "Ultimate edition" msgid "Ultimate edition"
msgstr "企业旗舰版" msgstr "企业旗舰版"
#~ msgid "Job center"
#~ msgstr "任务中心"
#, fuzzy
#~| msgid "Task"
#~ msgid "Tasks"
#~ msgstr "任务"
#~ msgid "Average time taken" #~ msgid "Average time taken"
#~ msgstr "平均耗时" #~ msgstr "平均耗时"

View File

@ -1341,5 +1341,6 @@
"VaultHCPMountPoint": "The mount point of the Vault server, default is jumpserver", "VaultHCPMountPoint": "The mount point of the Vault server, default is jumpserver",
"WeChat": "WeChat", "WeChat": "WeChat",
"SuEnabled": "Enabled su", "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." "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."
} }

View File

@ -1340,5 +1340,6 @@
"PublicIp": "公有 IP", "PublicIp": "公有 IP",
"PrivateIp": "私有 IP", "PrivateIp": "私有 IP",
"WeChat": "微信", "WeChat": "微信",
"Gateway": "网关",
"StopLogOutput": "Task Canceled当前任务(currentTaskId)已手动停止,由于每个任务的执行进度不一样,下面是任务最终的执行结果,执行失败表示已成功停止任务执行。" "StopLogOutput": "Task Canceled当前任务(currentTaskId)已手动停止,由于每个任务的执行进度不一样,下面是任务最终的执行结果,执行失败表示已成功停止任务执行。"
} }

View File

@ -66,6 +66,7 @@ exclude_permissions = (
('accounts', 'account', 'change', 'accountsecret'), ('accounts', 'account', 'change', 'accountsecret'),
('accounts', 'account', 'view', 'historyaccount'), ('accounts', 'account', 'view', 'historyaccount'),
('accounts', 'account', 'view', 'historyaccountsecret'), ('accounts', 'account', 'view', 'historyaccountsecret'),
('accounts', 'accounttemplate', 'change_accounttemplatesecret', 'accounttemplate'),
('perms', 'userassetgrantedtreenoderelation', '*', '*'), ('perms', 'userassetgrantedtreenoderelation', '*', '*'),
('perms', 'permedaccount', '*', '*'), ('perms', 'permedaccount', '*', '*'),

View File

@ -98,7 +98,6 @@ special_pid_mapper = {
"accounts.view_changesecretrecord": "asset_change_plan_node", "accounts.view_changesecretrecord": "asset_change_plan_node",
'audits.ftplog': 'terminal', 'audits.ftplog': 'terminal',
'perms.view_myassets': 'my_assets', 'perms.view_myassets': 'my_assets',
'ops.job': 'operation_center', 'ops.job': 'operation_center',
'ops.adhoc': 'operation_center', 'ops.adhoc': 'operation_center',
'ops.playbook': 'operation_center', 'ops.playbook': 'operation_center',
@ -133,7 +132,6 @@ special_setting_pid_mapper = {
'terminal.applethostdeployment': 'remote_app', 'terminal.applethostdeployment': 'remote_app',
"settings.change_terminal": "components", "settings.change_terminal": "components",
"terminal.terminal": "components", "terminal.terminal": "components",
"terminal.view_terminal": "components",
"terminal.endpoint": "components", "terminal.endpoint": "components",
"terminal.endpointrule": "components", "terminal.endpointrule": "components",
"terminal.status": "components", "terminal.status": "components",

View File

@ -8,8 +8,8 @@ from django.core.mail import send_mail
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework.views import Response, APIView 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.tasks import get_email_connection as get_connection
from common.utils import get_logger
from .. import serializers from .. import serializers
logger = get_logger(__file__) logger = get_logger(__file__)
@ -44,7 +44,7 @@ class MailTestingAPI(APIView):
# setattr(settings, k, v) # setattr(settings, k, v)
try: try:
subject = settings.EMAIL_SUBJECT_PREFIX or '' + "Test" subject = settings.EMAIL_SUBJECT_PREFIX or '' + "Test"
message = "Test smtp setting" message = _("Test smtp setting")
email_from = email_from or email_host_user email_from = email_from or email_host_user
email_recipient = email_recipient or email_from email_recipient = email_recipient or email_from
connection = get_connection( connection = get_connection(