From 4065baf78511b83f466f606dd74efeb358efaad4 Mon Sep 17 00:00:00 2001
From: fit2bot <68588906+fit2bot@users.noreply.github.com>
Date: Mon, 25 Sep 2023 16:25:44 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95?=
=?UTF-8?q?=E5=A0=A1=E5=9E=92=E6=9C=BA=E6=97=B6=E9=80=9A=E7=9F=A5=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E5=91=98=20(#11686)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: feng <1304903146@qq.com>
---
apps/acls/const.py | 1 +
apps/acls/notifications.py | 38 ++
.../templates/acls/user_login_reminder.html | 14 +
apps/audits/signal_handlers/login_log.py | 27 +-
apps/authentication/mixins.py | 7 +-
apps/locale/ja/LC_MESSAGES/django.mo | 4 +-
apps/locale/ja/LC_MESSAGES/django.po | 418 +++++++++--------
apps/locale/zh/LC_MESSAGES/django.mo | 4 +-
apps/locale/zh/LC_MESSAGES/django.po | 419 ++++++++++--------
apps/tickets/handlers/base.py | 2 +-
10 files changed, 553 insertions(+), 381 deletions(-)
create mode 100644 apps/acls/notifications.py
create mode 100644 apps/acls/templates/acls/user_login_reminder.html
diff --git a/apps/acls/const.py b/apps/acls/const.py
index c2d2be586..cccc906f4 100644
--- a/apps/acls/const.py
+++ b/apps/acls/const.py
@@ -7,3 +7,4 @@ class ActionChoices(models.TextChoices):
accept = 'accept', _('Accept')
review = 'review', _('Review')
warning = 'warning', _('Warning')
+ notice = 'notice', _('Notifications')
diff --git a/apps/acls/notifications.py b/apps/acls/notifications.py
new file mode 100644
index 000000000..57414c65d
--- /dev/null
+++ b/apps/acls/notifications.py
@@ -0,0 +1,38 @@
+from django.template.loader import render_to_string
+from django.utils.translation import gettext_lazy as _
+
+from audits.models import UserLoginLog
+from notifications.notifications import UserMessage
+from users.models import User
+
+
+class UserLoginReminderMsg(UserMessage):
+ subject = _('User login reminder')
+
+ def __init__(self, user, user_log: UserLoginLog):
+ self.user_log = user_log
+ super().__init__(user)
+
+ def get_html_msg(self) -> dict:
+ user_log = self.user_log
+
+ context = {
+ 'ip': user_log.ip,
+ 'city': user_log.city,
+ 'username': user_log.username,
+ 'recipient': self.user.username,
+ 'user_agent': user_log.user_agent,
+ }
+ message = render_to_string('acls/user_login_reminder.html', context)
+
+ print('message', message)
+ return {
+ 'subject': str(self.subject),
+ 'message': message
+ }
+
+ @classmethod
+ def gen_test_msg(cls):
+ user = User.objects.first()
+ user_log = UserLoginLog.objects.first()
+ return cls(user, user_log)
diff --git a/apps/acls/templates/acls/user_login_reminder.html b/apps/acls/templates/acls/user_login_reminder.html
new file mode 100644
index 000000000..3af4fd52a
--- /dev/null
+++ b/apps/acls/templates/acls/user_login_reminder.html
@@ -0,0 +1,14 @@
+{% load i18n %}
+
+
{% trans 'Respectful' %}{{ recipient }},
+
+{% trans 'Username' %}: [{{ username }}]
+IP: [{{ ip }}]
+{% trans 'Login city' %}: [{{ city }}]
+{% trans 'User agent' %}: [{{ user_agent }}]
+
+
+{% trans 'The user has just successfully logged into the system. Please ensure that this is an authorized operation. If you suspect that this is an unauthorized access, please take appropriate measures immediately.' %}
+
+{% trans 'Thank you' %}!
+
diff --git a/apps/audits/signal_handlers/login_log.py b/apps/audits/signal_handlers/login_log.py
index fae32a44b..835e4842f 100644
--- a/apps/audits/signal_handlers/login_log.py
+++ b/apps/audits/signal_handlers/login_log.py
@@ -11,6 +11,9 @@ from django.utils.functional import LazyObject
from django.utils.translation import gettext_lazy as _
from rest_framework.request import Request
+from acls.const import ActionChoices
+from acls.models import LoginACL
+from acls.notifications import UserLoginReminderMsg
from audits.models import UserLoginLog
from authentication.signals import post_auth_failed, post_auth_success
from authentication.utils import check_different_city_login_if_need
@@ -102,21 +105,37 @@ def create_user_session(request, user_id, instance: UserLoginLog):
request.session['user_session_id'] = user_session.id
+def send_login_info_to_reviewers(instance: UserLoginLog, reviewers):
+ for reviewer in reviewers:
+ UserLoginReminderMsg(reviewer, instance).publish_async()
+
+
@receiver(post_auth_success)
def on_user_auth_success(sender, user, request, login_type=None, **kwargs):
logger.debug('User login success: {}'.format(user.username))
check_different_city_login_if_need(user, request)
- data = generate_data(
- user.username, request, login_type=login_type
- )
- request.session['login_time'] = data['datetime'].strftime("%Y-%m-%d %H:%M:%S")
+ data = generate_data(user.username, request, login_type=login_type)
+ request.session['login_time'] = data['datetime'].strftime('%Y-%m-%d %H:%M:%S')
data.update({'mfa': int(user.mfa_enabled), 'status': True})
instance = write_login_log(**data)
+
# TODO 目前只记录 web 登录的 session
if instance.type != LoginTypeChoices.web:
return
create_user_session(request, user.id, instance)
+ auth_notice_required = request.session.get('auth_notice_required')
+ if not auth_notice_required:
+ return
+
+ auth_acl_id = request.session.get('auth_acl_id')
+ acl = LoginACL.objects.filter(id=auth_acl_id, action=ActionChoices.notice).first()
+ if not acl or not acl.reviewers.exists():
+ return
+
+ reviewers = acl.reviewers.all()
+ send_login_info_to_reviewers(instance, reviewers)
+
@receiver(post_auth_failed)
def on_user_auth_failed(sender, username, request, reason='', **kwargs):
diff --git a/apps/authentication/mixins.py b/apps/authentication/mixins.py
index b301af6c3..9667e85c7 100644
--- a/apps/authentication/mixins.py
+++ b/apps/authentication/mixins.py
@@ -355,6 +355,11 @@ class AuthACLMixin:
self.request.session['auth_acl_id'] = str(acl.id)
return
+ if acl.is_action(acl.ActionChoices.notice):
+ self.request.session['auth_notice_required'] = '1'
+ self.request.session['auth_acl_id'] = str(acl.id)
+ return
+
def _check_third_party_login_acl(self):
request = self.request
error_message = getattr(request, 'error_message', None)
@@ -513,7 +518,7 @@ class AuthMixin(CommonMixin, AuthPreCheckMixin, AuthACLMixin, MFAMixin, AuthPost
def clear_auth_mark(self):
keys = [
'auth_password', 'user_id', 'auth_confirm_required',
- 'auth_ticket_id', 'auth_acl_id'
+ 'auth_notice_required', 'auth_ticket_id', 'auth_acl_id'
]
for k in keys:
self.request.session.pop(k, '')
diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo
index e12251412..8e58c4d50 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:2ffdd50c364a510b4f5cfe7922a5f1a604e8bc7b03aa43ece1dff0250ccde6d6
-size 160575
+oid sha256:47cea504e9acfdcc94a45f2ea96216dddde065d134a92a0ef3e92815a12df6fc
+size 162024
diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po
index aa30a95b7..1c40efb67 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: 2023-09-19 15:41+0800\n"
+"POT-Creation-Date: 2023-09-25 16:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -24,9 +24,9 @@ msgstr "パラメータ 'action' は [{}] でなければなりません。"
#: accounts/const/account.py:6
#: accounts/serializers/automations/change_secret.py:32
-#: assets/models/_user.py:24 audits/signal_handlers/login_log.py:35
+#: assets/models/_user.py:24 audits/signal_handlers/login_log.py:37
#: authentication/confirm/password.py:9 authentication/forms.py:32
-#: authentication/templates/authentication/login.html:286
+#: authentication/templates/authentication/login.html:324
#: settings/serializers/auth/ldap.py:25 settings/serializers/auth/ldap.py:47
#: users/forms/profile.py:22 users/serializers/user.py:105
#: users/templates/users/_msg_user_created.html:13
@@ -71,7 +71,7 @@ msgstr "動的コード"
msgid "Anonymous account"
msgstr "匿名ユーザー"
-#: accounts/const/account.py:25 users/models/user.py:744
+#: accounts/const/account.py:25 users/models/user.py:741
msgid "Local"
msgstr "ローカル"
@@ -79,7 +79,7 @@ msgstr "ローカル"
msgid "Collected"
msgstr "集めました"
-#: accounts/const/account.py:27 accounts/serializers/account/account.py:27
+#: accounts/const/account.py:27 accounts/serializers/account/account.py:28
#: settings/serializers/auth/sms.py:75
msgid "Template"
msgstr "テンプレート"
@@ -96,7 +96,7 @@ msgstr "更新"
#: accounts/const/account.py:33
#: accounts/serializers/automations/change_secret.py:155 audits/const.py:55
#: audits/signal_handlers/activity_log.py:33 common/const/choices.py:19
-#: ops/const.py:62 terminal/const.py:77 xpack/plugins/cloud/const.py:43
+#: ops/const.py:74 terminal/const.py:77 xpack/plugins/cloud/const.py:43
msgid "Failed"
msgstr "失敗しました"
@@ -217,15 +217,15 @@ msgstr "ユーザー %s がパスワードを閲覧/導き出しました"
#: accounts/models/account.py:48
#: accounts/models/automations/gather_account.py:16
-#: accounts/serializers/account/account.py:205
-#: accounts/serializers/account/account.py:250
+#: accounts/serializers/account/account.py:209
+#: accounts/serializers/account/account.py:254
#: accounts/serializers/account/gathered_account.py:10
#: accounts/serializers/automations/change_secret.py:111
#: accounts/serializers/automations/change_secret.py:131
#: acls/serializers/base.py:123 assets/models/asset/common.py:93
#: assets/models/asset/common.py:334 assets/models/cmd_filter.py:36
#: assets/serializers/domain.py:19 assets/serializers/label.py:27
-#: audits/models.py:54 authentication/models/connection_token.py:36
+#: audits/models.py:56 authentication/models/connection_token.py:36
#: perms/models/asset_permission.py:64 perms/serializers/permission.py:34
#: terminal/backends/command/models.py:17 terminal/models/session/session.py:31
#: terminal/notifications.py:155 terminal/serializers/command.py:17
@@ -237,8 +237,8 @@ msgid "Asset"
msgstr "資産"
#: accounts/models/account.py:52 accounts/models/template.py:15
-#: accounts/serializers/account/account.py:212
-#: accounts/serializers/account/account.py:260
+#: accounts/serializers/account/account.py:216
+#: accounts/serializers/account/account.py:264
#: accounts/serializers/account/template.py:25
#: authentication/serializers/connect_token_secret.py:49
msgid "Su from"
@@ -250,8 +250,8 @@ msgstr "から切り替え"
msgid "Version"
msgstr "バージョン"
-#: accounts/models/account.py:56 accounts/serializers/account/account.py:207
-#: users/models/user.py:846
+#: accounts/models/account.py:56 accounts/serializers/account/account.py:211
+#: users/models/user.py:843
msgid "Source"
msgstr "ソース"
@@ -263,7 +263,7 @@ msgstr "ソース ID"
#: accounts/serializers/automations/change_secret.py:112
#: accounts/serializers/automations/change_secret.py:132
#: acls/serializers/base.py:124 assets/serializers/asset/common.py:125
-#: assets/serializers/gateway.py:28 audits/models.py:55 ops/models/base.py:18
+#: assets/serializers/gateway.py:28 audits/models.py:57 ops/models/base.py:18
#: perms/models/asset_permission.py:70 perms/serializers/permission.py:39
#: terminal/backends/command/models.py:18 terminal/models/session/session.py:33
#: terminal/templates/terminal/_msg_command_warning.html:8
@@ -306,7 +306,7 @@ msgid "Account backup plan"
msgstr "アカウントバックアップ計画"
#: accounts/models/automations/backup_account.py:91
-#: assets/models/automations/base.py:115 audits/models.py:61
+#: assets/models/automations/base.py:115 audits/models.py:63
#: ops/models/base.py:55 ops/models/celery.py:63 ops/models/job.py:228
#: ops/templates/ops/celery_task_log.html:75
#: perms/models/asset_permission.py:72 terminal/models/applet/host.py:140
@@ -334,7 +334,7 @@ msgstr "アカウントのバックアップスナップショット"
msgid "Trigger mode"
msgstr "トリガーモード"
-#: accounts/models/automations/backup_account.py:105 audits/models.py:195
+#: accounts/models/automations/backup_account.py:105 audits/models.py:197
#: terminal/models/session/sharing.py:125 xpack/plugins/cloud/models.py:205
msgid "Reason"
msgstr "理由"
@@ -420,10 +420,10 @@ msgid "Date finished"
msgstr "終了日"
#: accounts/models/automations/change_secret.py:44
-#: accounts/serializers/account/account.py:252 assets/const/automation.py:8
+#: accounts/serializers/account/account.py:256 assets/const/automation.py:8
#: authentication/templates/authentication/passkey.html:173
-#: authentication/views/base.py:26 authentication/views/base.py:27
-#: authentication/views/base.py:28 common/const/choices.py:20
+#: authentication/views/base.py:27 authentication/views/base.py:28
+#: authentication/views/base.py:29 common/const/choices.py:20
msgid "Error"
msgstr "間違い"
@@ -442,13 +442,13 @@ msgstr "最終ログイン日"
#: accounts/models/automations/gather_account.py:17
#: accounts/models/automations/push_account.py:15 accounts/models/base.py:65
#: accounts/serializers/account/virtual.py:21 acls/serializers/base.py:19
-#: acls/serializers/base.py:50 assets/models/_user.py:23 audits/models.py:180
-#: authentication/forms.py:25 authentication/forms.py:27
-#: authentication/models/temp_token.py:9
+#: acls/serializers/base.py:50 acls/templates/acls/user_login_reminder.html:5
+#: assets/models/_user.py:23 audits/models.py:182 authentication/forms.py:25
+#: authentication/forms.py:27 authentication/models/temp_token.py:9
#: authentication/templates/authentication/_msg_different_city.html:9
#: authentication/templates/authentication/_msg_oauth_bind.html:9
#: users/forms/profile.py:32 users/forms/profile.py:115
-#: users/models/user.py:796 users/templates/users/_msg_user_created.html:12
+#: users/models/user.py:793 users/templates/users/_msg_user_created.html:12
#: xpack/plugins/cloud/serializers/account_attrs.py:26
msgid "Username"
msgstr "ユーザー名"
@@ -476,7 +476,7 @@ msgstr "トリガー方式"
#: accounts/models/automations/push_account.py:16 acls/models/base.py:41
#: acls/serializers/base.py:57 assets/models/cmd_filter.py:81
-#: audits/models.py:88 audits/serializers.py:84
+#: audits/models.py:90 audits/serializers.py:84
#: authentication/serializers/connect_token_secret.py:116
#: authentication/templates/authentication/_access_key_modal.html:34
msgid "Action"
@@ -491,7 +491,7 @@ msgid "Verify asset account"
msgstr "アカウントの確認"
#: accounts/models/base.py:37 accounts/models/base.py:67
-#: accounts/serializers/account/account.py:432
+#: accounts/serializers/account/account.py:436
#: accounts/serializers/account/base.py:16
#: accounts/serializers/automations/change_secret.py:45
#: authentication/serializers/connect_token_secret.py:41
@@ -537,7 +537,7 @@ msgstr "パスワードルール"
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:84 users/forms/profile.py:33
#: users/models/group.py:13 users/models/preference.py:11
-#: users/models/user.py:798 xpack/plugins/cloud/models.py:32
+#: users/models/user.py:795 xpack/plugins/cloud/models.py:32
#: xpack/plugins/cloud/models.py:273 xpack/plugins/cloud/serializers/task.py:68
msgid "Name"
msgstr "名前"
@@ -649,15 +649,15 @@ msgstr ""
"{} -暗号化変更タスクが完了しました: 暗号化パスワードが設定されていません-個人"
"情報にアクセスしてください-> ファイル暗号化パスワードを設定してください"
-#: accounts/serializers/account/account.py:30
+#: accounts/serializers/account/account.py:31
msgid "Push now"
msgstr "今すぐプッシュ"
-#: accounts/serializers/account/account.py:37
+#: accounts/serializers/account/account.py:38
msgid "Exist policy"
msgstr "アカウントの存在ポリシー"
-#: accounts/serializers/account/account.py:185 applications/models.py:11
+#: accounts/serializers/account/account.py:189 applications/models.py:11
#: assets/models/label.py:21 assets/models/platform.py:89
#: assets/serializers/asset/common.py:121 assets/serializers/cagegory.py:8
#: assets/serializers/platform.py:133 assets/serializers/platform.py:229
@@ -666,7 +666,7 @@ msgstr "アカウントの存在ポリシー"
msgid "Category"
msgstr "カテゴリ"
-#: accounts/serializers/account/account.py:186
+#: accounts/serializers/account/account.py:190
#: accounts/serializers/automations/base.py:54 acls/models/command_acl.py:24
#: acls/serializers/command_acl.py:18 applications/models.py:14
#: assets/models/_user.py:50 assets/models/automations/base.py:20
@@ -686,26 +686,26 @@ msgstr "カテゴリ"
msgid "Type"
msgstr "タイプ"
-#: accounts/serializers/account/account.py:201
+#: accounts/serializers/account/account.py:205
msgid "Asset not found"
msgstr "資産が存在しません"
-#: accounts/serializers/account/account.py:241
+#: accounts/serializers/account/account.py:245
msgid "Has secret"
msgstr "エスクローされたパスワード"
-#: accounts/serializers/account/account.py:251 ops/models/celery.py:60
+#: accounts/serializers/account/account.py:255 ops/models/celery.py:60
#: tickets/models/comment.py:13 tickets/models/ticket/general.py:45
#: tickets/models/ticket/general.py:279 tickets/serializers/super_ticket.py:14
#: tickets/serializers/ticket/ticket.py:21
msgid "State"
msgstr "状態"
-#: accounts/serializers/account/account.py:253
+#: accounts/serializers/account/account.py:257
msgid "Changed"
msgstr "編集済み"
-#: accounts/serializers/account/account.py:263
+#: accounts/serializers/account/account.py:267
#: accounts/serializers/automations/base.py:22 acls/models/base.py:97
#: assets/models/automations/base.py:19
#: assets/serializers/automations/base.py:20 ops/models/base.py:17
@@ -714,29 +714,29 @@ msgstr "編集済み"
msgid "Assets"
msgstr "資産"
-#: accounts/serializers/account/account.py:318
+#: accounts/serializers/account/account.py:322
msgid "Account already exists"
msgstr "アカウントはすでに存在しています"
-#: accounts/serializers/account/account.py:368
+#: accounts/serializers/account/account.py:372
#, python-format
msgid "Asset does not support this secret type: %s"
msgstr "アセットはアカウント タイプをサポートしていません: %s"
-#: accounts/serializers/account/account.py:400
+#: accounts/serializers/account/account.py:404
msgid "Account has exist"
msgstr "アカウントはすでに存在しています"
-#: accounts/serializers/account/account.py:433
+#: accounts/serializers/account/account.py:437
#: authentication/serializers/connect_token_secret.py:156
#: authentication/templates/authentication/_access_key_modal.html:30
#: perms/models/perm_node.py:21 users/serializers/group.py:31
msgid "ID"
msgstr "ID"
-#: accounts/serializers/account/account.py:440 acls/serializers/base.py:116
-#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:50
-#: audits/models.py:86 audits/models.py:164 audits/models.py:262
+#: accounts/serializers/account/account.py:447 acls/serializers/base.py:116
+#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:52
+#: audits/models.py:88 audits/models.py:166 audits/models.py:264
#: audits/serializers.py:171 authentication/models/connection_token.py:32
#: authentication/models/sso_token.py:16
#: notifications/models/notification.py:12
@@ -748,12 +748,12 @@ msgstr "ID"
#: terminal/notifications.py:205 terminal/serializers/command.py:16
#: terminal/templates/terminal/_msg_command_warning.html:6
#: terminal/templates/terminal/_msg_session_sharing.html:6
-#: tickets/models/comment.py:21 users/const.py:14 users/models/user.py:996
-#: users/models/user.py:1032 users/serializers/group.py:18
+#: tickets/models/comment.py:21 users/const.py:14 users/models/user.py:993
+#: users/models/user.py:1029 users/serializers/group.py:18
msgid "User"
msgstr "ユーザー"
-#: accounts/serializers/account/account.py:441
+#: accounts/serializers/account/account.py:448
#: authentication/templates/authentication/_access_key_modal.html:33
#: terminal/notifications.py:158 terminal/notifications.py:207
msgid "Date"
@@ -761,7 +761,7 @@ msgstr "日付"
#: accounts/serializers/account/backup.py:31
#: accounts/serializers/automations/base.py:36
-#: assets/serializers/automations/base.py:34 ops/mixin.py:23 ops/mixin.py:103
+#: assets/serializers/automations/base.py:34 ops/mixin.py:23 ops/mixin.py:104
#: settings/serializers/auth/ldap.py:66
msgid "Periodic perform"
msgstr "定期的なパフォーマンス"
@@ -798,28 +798,24 @@ msgstr ""
"場合は、`username@domain`のようになります。"
#: accounts/serializers/account/template.py:11
-#, fuzzy
-#| msgid "Password strength"
msgid "Password length"
-msgstr "パスワードの強さ"
+msgstr "パスワードの長さ"
#: accounts/serializers/account/template.py:12
-#, fuzzy
-#| msgid "Powershell"
msgid "Lowercase"
-msgstr "PowerShell"
+msgstr "小文字"
#: accounts/serializers/account/template.py:13
msgid "Uppercase"
-msgstr ""
+msgstr "大文字"
#: accounts/serializers/account/template.py:14
msgid "Digit"
-msgstr ""
+msgstr "数値#スウスウ#"
#: accounts/serializers/account/template.py:15
msgid "Special symbol"
-msgstr ""
+msgstr "特殊記号"
#: accounts/serializers/account/template.py:36
msgid "Secret generation strategy for account creation"
@@ -844,7 +840,7 @@ msgstr "关联平台,可以配置推送参数,如果不关联,则使用默
#: terminal/models/component/endpoint.py:24
#: terminal/models/component/endpoint.py:104
#: terminal/models/session/session.py:46 tickets/models/comment.py:32
-#: tickets/models/ticket/general.py:297 users/models/user.py:834
+#: tickets/models/ticket/general.py:297 users/models/user.py:831
#: xpack/plugins/cloud/models.py:39 xpack/plugins/cloud/models.py:109
msgid "Comment"
msgstr "コメント"
@@ -895,8 +891,8 @@ msgid "Automation task execution"
msgstr "自動タスク実行履歴"
#: accounts/serializers/automations/change_secret.py:154 audits/const.py:54
-#: audits/models.py:60 audits/signal_handlers/activity_log.py:33
-#: common/const/choices.py:18 ops/const.py:60 ops/serializers/celery.py:40
+#: audits/models.py:62 audits/signal_handlers/activity_log.py:33
+#: common/const/choices.py:18 ops/const.py:72 ops/serializers/celery.py:40
#: terminal/const.py:76 terminal/models/session/sharing.py:121
#: tickets/views/approve.py:119
msgid "Success"
@@ -986,6 +982,10 @@ msgstr "レビュー担当者"
msgid "Warning"
msgstr "警告"
+#: acls/const.py:10 notifications/apps.py:7
+msgid "Notifications"
+msgstr "通知"
+
#: acls/models/base.py:37 assets/models/_user.py:51
#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97
#: xpack/plugins/cloud/models.py:275
@@ -1097,6 +1097,10 @@ msgstr "ログインasset acl"
msgid "Login asset confirm"
msgstr "ログイン資産の確認"
+#: acls/notifications.py:10
+msgid "User login reminder"
+msgstr "ユーザーログインのリマインダ"
+
#: acls/serializers/base.py:11 acls/serializers/login_acl.py:11
msgid "With * indicating a match all. "
msgstr "* はすべて一致することを示します。"
@@ -1152,6 +1156,36 @@ msgstr "IP"
msgid "Time Period"
msgstr "期間"
+#: acls/templates/acls/user_login_reminder.html:3
+msgid "Respectful"
+msgstr "尊敬する"
+
+#: acls/templates/acls/user_login_reminder.html:7 audits/models.py:188
+#: audits/models.py:257
+#: authentication/templates/authentication/_msg_different_city.html:11
+#: tickets/models/ticket/login_confirm.py:11
+msgid "Login city"
+msgstr "ログイン都市"
+
+#: acls/templates/acls/user_login_reminder.html:8 audits/models.py:191
+#: audits/models.py:258 audits/serializers.py:65
+msgid "User agent"
+msgstr "ユーザーエージェント"
+
+#: acls/templates/acls/user_login_reminder.html:11
+msgid ""
+"The user has just successfully logged into the system. Please ensure that "
+"this is an authorized operation. If you suspect that this is an unauthorized "
+"access, please take appropriate measures immediately."
+msgstr ""
+"ユーザーはシステムに正常にログインしたばかりです。許可されたアクションである"
+"ことを確認してください。不正アクセスが疑われる場合は、すぐに適切な措置を取っ"
+"てください。"
+
+#: acls/templates/acls/user_login_reminder.html:13
+msgid "Thank you"
+msgstr "ありがとうございます。"
+
#: applications/apps.py:9
msgid "Applications"
msgstr "アプリケーション"
@@ -1260,7 +1294,7 @@ msgstr "無効"
#: assets/const/base.py:34 settings/serializers/basic.py:6
#: users/serializers/preference/koko.py:15
-#: users/serializers/preference/lina.py:32
+#: users/serializers/preference/lina.py:39
#: users/serializers/preference/luna.py:60
msgid "Basic"
msgstr "基本"
@@ -1473,19 +1507,19 @@ msgstr "SSHパブリックキー"
#: assets/models/_user.py:28 assets/models/automations/base.py:114
#: assets/models/cmd_filter.py:41 assets/models/group.py:19
-#: audits/models.py:259 common/db/models.py:34 ops/models/base.py:54
-#: ops/models/job.py:227 users/models/user.py:1033
+#: audits/models.py:261 common/db/models.py:34 ops/models/base.py:54
+#: ops/models/job.py:227 users/models/user.py:1030
msgid "Date created"
msgstr "作成された日付"
#: assets/models/_user.py:29 assets/models/cmd_filter.py:42
-#: common/db/models.py:35 users/models/user.py:855
+#: common/db/models.py:35 users/models/user.py:852
msgid "Date updated"
msgstr "更新日"
#: assets/models/_user.py:30 assets/models/cmd_filter.py:44
#: assets/models/cmd_filter.py:91 assets/models/group.py:18
-#: common/db/models.py:32 users/models/user.py:841
+#: common/db/models.py:32 users/models/user.py:838
#: users/serializers/group.py:29
msgid "Created by"
msgstr "によって作成された"
@@ -1521,7 +1555,7 @@ msgstr "プロトコル"
msgid "Sudo"
msgstr "すど"
-#: assets/models/_user.py:55 ops/const.py:49
+#: assets/models/_user.py:55 ops/const.py:49 ops/const.py:59
msgid "Shell"
msgstr "シェル"
@@ -1650,7 +1684,7 @@ msgstr "自動化されたタスク"
msgid "Asset automation task"
msgstr "アセットの自動化タスク"
-#: assets/models/automations/base.py:113 audits/models.py:200
+#: assets/models/automations/base.py:113 audits/models.py:202
#: audits/serializers.py:51 ops/models/base.py:49 ops/models/job.py:220
#: terminal/models/applet/applet.py:301 terminal/models/applet/host.py:139
#: terminal/models/component/status.py:30 terminal/serializers/applet.py:18
@@ -1679,7 +1713,7 @@ msgstr "確認済みの日付"
#: assets/models/cmd_filter.py:28 perms/models/asset_permission.py:61
#: perms/serializers/permission.py:32 users/models/group.py:25
-#: users/models/user.py:804
+#: users/models/user.py:801
msgid "User group"
msgstr "ユーザーグループ"
@@ -1729,11 +1763,11 @@ msgstr "デフォルト"
msgid "Default asset group"
msgstr "デフォルトアセットグループ"
-#: assets/models/label.py:15 rbac/const.py:6 users/models/user.py:1018
+#: assets/models/label.py:15 rbac/const.py:6 users/models/user.py:1015
msgid "System"
msgstr "システム"
-#: assets/models/label.py:19 assets/models/node.py:544
+#: assets/models/label.py:19 assets/models/node.py:539
#: assets/serializers/cagegory.py:7 assets/serializers/cagegory.py:14
#: authentication/models/connection_token.py:29
#: authentication/serializers/connect_token_secret.py:122
@@ -1755,28 +1789,28 @@ msgstr "ラベル"
msgid "New node"
msgstr "新しいノード"
-#: assets/models/node.py:472 audits/backends/db.py:55 audits/backends/db.py:56
+#: assets/models/node.py:467 audits/backends/db.py:55 audits/backends/db.py:56
msgid "empty"
msgstr "空"
-#: assets/models/node.py:543 perms/models/perm_node.py:28
+#: assets/models/node.py:538 perms/models/perm_node.py:28
msgid "Key"
msgstr "キー"
-#: assets/models/node.py:545 assets/serializers/node.py:20
+#: assets/models/node.py:540 assets/serializers/node.py:20
msgid "Full value"
msgstr "フルバリュー"
-#: assets/models/node.py:549 perms/models/perm_node.py:30
+#: assets/models/node.py:544 perms/models/perm_node.py:30
msgid "Parent key"
msgstr "親キー"
-#: assets/models/node.py:558 perms/serializers/permission.py:35
+#: assets/models/node.py:553 perms/serializers/permission.py:35
#: tickets/models/ticket/apply_asset.py:14 xpack/plugins/cloud/models.py:322
msgid "Node"
msgstr "ノード"
-#: assets/models/node.py:561
+#: assets/models/node.py:556
msgid "Can match node"
msgstr "ノードを一致させることができます"
@@ -2236,8 +2270,8 @@ msgstr "作成"
msgid "Connect"
msgstr "接続"
-#: audits/const.py:30 authentication/templates/authentication/login.html:252
-#: authentication/templates/authentication/login.html:325
+#: audits/const.py:30 authentication/templates/authentication/login.html:290
+#: authentication/templates/authentication/login.html:363
#: templates/_header_bar.html:95
msgid "Login"
msgstr "ログイン"
@@ -2252,7 +2286,7 @@ msgstr "パスワードを変更する"
msgid "Terminal"
msgstr "ターミナル"
-#: audits/const.py:41 audits/models.py:128
+#: audits/const.py:41 audits/models.py:130
msgid "Operate log"
msgstr "ログの操作"
@@ -2281,28 +2315,28 @@ msgstr "是"
msgid "No"
msgstr "否"
-#: audits/models.py:43
+#: audits/models.py:45
msgid "Job audit log"
msgstr "ジョブ監査ログ"
-#: audits/models.py:52 audits/models.py:96 audits/models.py:167
+#: audits/models.py:54 audits/models.py:98 audits/models.py:169
#: terminal/models/session/session.py:38 terminal/models/session/sharing.py:113
msgid "Remote addr"
msgstr "リモートaddr"
-#: audits/models.py:57 audits/serializers.py:35
+#: audits/models.py:59 audits/serializers.py:35
msgid "Operate"
msgstr "操作"
-#: audits/models.py:59
+#: audits/models.py:61
msgid "Filename"
msgstr "ファイル名"
-#: audits/models.py:62 common/serializers/common.py:98
+#: audits/models.py:64 common/serializers/common.py:98
msgid "File"
msgstr "書類"
-#: audits/models.py:63 terminal/backends/command/models.py:21
+#: audits/models.py:65 terminal/backends/command/models.py:21
#: terminal/models/session/replay.py:9 terminal/models/session/sharing.py:20
#: terminal/models/session/sharing.py:95
#: terminal/templates/terminal/_msg_command_alert.html:10
@@ -2311,103 +2345,93 @@ msgstr "書類"
msgid "Session"
msgstr "セッション"
-#: audits/models.py:66
+#: audits/models.py:68
msgid "File transfer log"
msgstr "ファイル転送ログ"
-#: audits/models.py:90 audits/serializers.py:86
+#: audits/models.py:92 audits/serializers.py:86
msgid "Resource Type"
msgstr "リソースタイプ"
-#: audits/models.py:91 audits/models.py:94 audits/models.py:140
+#: audits/models.py:93 audits/models.py:96 audits/models.py:142
#: audits/serializers.py:85
msgid "Resource"
msgstr "リソース"
-#: audits/models.py:97 audits/models.py:143 audits/models.py:169
+#: audits/models.py:99 audits/models.py:145 audits/models.py:171
#: terminal/serializers/command.py:75
msgid "Datetime"
msgstr "時間"
-#: audits/models.py:136
+#: audits/models.py:138
msgid "Activity type"
msgstr "活動の種類"
-#: audits/models.py:146
+#: audits/models.py:148
msgid "Detail"
msgstr "詳細"
-#: audits/models.py:149
+#: audits/models.py:151
msgid "Detail ID"
msgstr "詳細 ID"
-#: audits/models.py:153
+#: audits/models.py:155
msgid "Activity log"
msgstr "活動記録"
-#: audits/models.py:165
+#: audits/models.py:167
msgid "Change by"
msgstr "による変更"
-#: audits/models.py:175
+#: audits/models.py:177
msgid "Password change log"
msgstr "パスワード変更ログ"
-#: audits/models.py:182 audits/models.py:257
+#: audits/models.py:184 audits/models.py:259
msgid "Login type"
msgstr "ログインタイプ"
-#: audits/models.py:184 audits/models.py:253
+#: audits/models.py:186 audits/models.py:255
#: tickets/models/ticket/login_confirm.py:10
msgid "Login IP"
msgstr "ログインIP"
-#: audits/models.py:186 audits/models.py:255
-#: authentication/templates/authentication/_msg_different_city.html:11
-#: tickets/models/ticket/login_confirm.py:11
-msgid "Login city"
-msgstr "ログイン都市"
-
-#: audits/models.py:189 audits/models.py:256 audits/serializers.py:65
-msgid "User agent"
-msgstr "ユーザーエージェント"
-
-#: audits/models.py:192 audits/serializers.py:49
+#: audits/models.py:194 audits/serializers.py:49
#: authentication/templates/authentication/_mfa_confirm_modal.html:14
-#: users/forms/profile.py:65 users/models/user.py:821
+#: users/forms/profile.py:65 users/models/user.py:818
#: users/serializers/profile.py:102
msgid "MFA"
msgstr "MFA"
-#: audits/models.py:202
+#: audits/models.py:204
msgid "Date login"
msgstr "日付ログイン"
-#: audits/models.py:204 audits/models.py:258 audits/serializers.py:67
+#: audits/models.py:206 audits/models.py:260 audits/serializers.py:67
#: audits/serializers.py:183
msgid "Authentication backend"
msgstr "認証バックエンド"
-#: audits/models.py:248
+#: audits/models.py:250
msgid "User login log"
msgstr "ユーザーログインログ"
-#: audits/models.py:254
+#: audits/models.py:256
msgid "Session key"
msgstr "セッションID"
-#: audits/models.py:260 authentication/models/connection_token.py:47
+#: audits/models.py:262 authentication/models/connection_token.py:47
#: authentication/models/temp_token.py:13 perms/models/asset_permission.py:74
#: tickets/models/ticket/apply_application.py:31
-#: tickets/models/ticket/apply_asset.py:20 users/models/user.py:839
+#: tickets/models/ticket/apply_asset.py:20 users/models/user.py:836
msgid "Date expired"
msgstr "期限切れの日付"
-#: audits/models.py:278
+#: audits/models.py:288
msgid "User session"
msgstr "ユーザーセッション"
-#: audits/models.py:280
+#: audits/models.py:290
msgid "Offline ussr session"
msgstr "ユーザー・セッションの下限"
@@ -2435,46 +2459,46 @@ msgstr "ユーザー %s はシステム %s にログインしています"
msgid "User %s perform a task for this resource: %s"
msgstr "ユーザー %s が現在のリソースでタスク (%s) を実行しました"
-#: audits/signal_handlers/login_log.py:34
+#: audits/signal_handlers/login_log.py:36
msgid "SSH Key"
msgstr "SSHキー"
-#: audits/signal_handlers/login_log.py:36 settings/serializers/auth/sso.py:13
+#: audits/signal_handlers/login_log.py:38 settings/serializers/auth/sso.py:13
msgid "SSO"
msgstr "SSO"
-#: audits/signal_handlers/login_log.py:37
+#: audits/signal_handlers/login_log.py:39
msgid "Auth Token"
msgstr "認証トークン"
-#: audits/signal_handlers/login_log.py:38 authentication/notifications.py:73
+#: audits/signal_handlers/login_log.py:40 authentication/notifications.py:73
#: authentication/views/login.py:77 authentication/views/wecom.py:159
#: notifications/backends/__init__.py:11 settings/serializers/auth/wecom.py:10
-#: users/models/user.py:751 users/models/user.py:856
+#: users/models/user.py:748 users/models/user.py:853
msgid "WeCom"
msgstr "企業微信"
-#: audits/signal_handlers/login_log.py:39 authentication/views/feishu.py:122
+#: audits/signal_handlers/login_log.py:41 authentication/views/feishu.py:122
#: authentication/views/login.py:89 notifications/backends/__init__.py:14
#: settings/serializers/auth/feishu.py:10
-#: settings/serializers/auth/feishu.py:13 users/models/user.py:753
-#: users/models/user.py:858
+#: settings/serializers/auth/feishu.py:13 users/models/user.py:750
+#: users/models/user.py:855
msgid "FeiShu"
msgstr "本を飛ばす"
-#: audits/signal_handlers/login_log.py:40 authentication/views/dingtalk.py:159
+#: audits/signal_handlers/login_log.py:42 authentication/views/dingtalk.py:159
#: authentication/views/login.py:83 notifications/backends/__init__.py:12
-#: settings/serializers/auth/dingtalk.py:10 users/models/user.py:752
-#: users/models/user.py:857
+#: settings/serializers/auth/dingtalk.py:10 users/models/user.py:749
+#: users/models/user.py:854
msgid "DingTalk"
msgstr "DingTalk"
-#: audits/signal_handlers/login_log.py:41
+#: audits/signal_handlers/login_log.py:43
#: authentication/models/temp_token.py:16
msgid "Temporary token"
msgstr "仮パスワード"
-#: audits/signal_handlers/login_log.py:42 authentication/views/login.py:95
+#: audits/signal_handlers/login_log.py:44 authentication/views/login.py:95
#: settings/serializers/auth/passkey.py:8
msgid "Passkey"
msgstr ""
@@ -2539,7 +2563,7 @@ msgstr ""
"さい。"
#: authentication/api/password.py:64
-#: authentication/templates/authentication/login.html:317
+#: authentication/templates/authentication/login.html:355
#: users/templates/users/forgot_password.html:27
#: users/templates/users/forgot_password.html:28
#: users/templates/users/forgot_password_previewing.html:13
@@ -3055,7 +3079,7 @@ msgstr "期限切れです"
#: authentication/serializers/password_mfa.py:24
#: notifications/backends/__init__.py:10 settings/serializers/msg.py:22
#: settings/serializers/msg.py:57 users/forms/profile.py:102
-#: users/forms/profile.py:109 users/models/user.py:800
+#: users/forms/profile.py:109 users/models/user.py:797
#: users/templates/users/forgot_password.html:117
#: users/views/profile/reset.py:73
msgid "Email"
@@ -3093,13 +3117,13 @@ msgid "Show"
msgstr "表示"
#: authentication/templates/authentication/_access_key_modal.html:66
-#: users/models/user.py:646 users/serializers/profile.py:92
+#: users/models/user.py:643 users/serializers/profile.py:92
#: users/templates/users/user_verify_mfa.html:36
msgid "Disable"
msgstr "無効化"
#: authentication/templates/authentication/_access_key_modal.html:67
-#: users/models/user.py:647 users/serializers/profile.py:93
+#: users/models/user.py:644 users/serializers/profile.py:93
#: users/templates/users/mfa_setting.html:26
#: users/templates/users/mfa_setting.html:68
msgid "Enable"
@@ -3256,7 +3280,7 @@ msgstr ""
msgid "Cancel"
msgstr "キャンセル"
-#: authentication/templates/authentication/login.html:237
+#: authentication/templates/authentication/login.html:270
msgid ""
"Configuration file has problems and cannot be logged in. Please contact the "
"administrator or view latest docs"
@@ -3264,11 +3288,11 @@ msgstr ""
"設定ファイルに問題があり、ログインできません。管理者に連絡するか、最新のド"
"キュメントを参照してください。"
-#: authentication/templates/authentication/login.html:238
+#: authentication/templates/authentication/login.html:271
msgid "If you are administrator, you can update the config resolve it, set"
msgstr "管理者の場合は、configを更新して解決することができます。"
-#: authentication/templates/authentication/login.html:332
+#: authentication/templates/authentication/login.html:370
msgid "More login options"
msgstr "その他のログインオプション"
@@ -3321,7 +3345,7 @@ msgstr "再試行しますか?"
msgid "LAN"
msgstr "ローカルエリアネットワーク"
-#: authentication/views/base.py:61
+#: authentication/views/base.py:67
#: perms/templates/perms/_msg_permed_items_expire.html:21
msgid "If you have any question, please contact the administrator"
msgstr "質問があったら、管理者に連絡して下さい"
@@ -3477,7 +3501,7 @@ msgstr "の準備を"
msgid "Pending"
msgstr "未定"
-#: common/const/choices.py:17 ops/const.py:59
+#: common/const/choices.py:17 ops/const.py:71
msgid "Running"
msgstr "ランニング"
@@ -3561,7 +3585,7 @@ msgstr "は破棄されます"
msgid "discard time"
msgstr "時間を捨てる"
-#: common/db/models.py:33 users/models/user.py:842
+#: common/db/models.py:33 users/models/user.py:839
msgid "Updated by"
msgstr "によって更新"
@@ -3789,10 +3813,6 @@ msgstr ""
"いる場合は、nginxリスニングポートにアクセスしていないことを証明してください。"
"頑張ってください。"
-#: notifications/apps.py:7
-msgid "Notifications"
-msgstr "通知"
-
#: notifications/backends/__init__.py:13
msgid "Site message"
msgstr "サイトメッセージ"
@@ -3841,14 +3861,34 @@ msgstr "タスクは存在しません"
msgid "Task {} args or kwargs error"
msgstr "タスク実行パラメータエラー"
-#: ops/api/playbook.py:37
+#: ops/api/playbook.py:39
msgid "Currently playbook is being used in a job"
msgstr "現在プレイブックは1つのジョブで使用されています"
-#: ops/api/playbook.py:91
+#: ops/api/playbook.py:93
msgid "Unsupported file content"
msgstr "サポートされていないファイルの内容"
+#: ops/api/playbook.py:95 ops/api/playbook.py:141 ops/api/playbook.py:189
+msgid "Invalid file path"
+msgstr "無効なファイルパス"
+
+#: ops/api/playbook.py:167
+msgid "This file can not be rename"
+msgstr "ファイル名を変更することはできません"
+
+#: ops/api/playbook.py:186
+msgid "File already exists"
+msgstr "ファイルは既に存在します。"
+
+#: ops/api/playbook.py:204
+msgid "File key is required"
+msgstr "ファイルキーこのフィールドは必須です"
+
+#: ops/api/playbook.py:207
+msgid "This file can not be delete"
+msgstr "このファイルを削除できません"
+
#: ops/apps.py:9 ops/notifications.py:17 rbac/tree.py:55
msgid "App ops"
msgstr "アプリ操作"
@@ -3901,31 +3941,39 @@ msgstr "特権アカウントのみ"
msgid "Privileged First"
msgstr "特権アカウント優先"
-#: ops/const.py:50
+#: ops/const.py:50 ops/const.py:60
msgid "Powershell"
msgstr "PowerShell"
-#: ops/const.py:51
+#: ops/const.py:51 ops/const.py:61
msgid "Python"
msgstr "Python"
-#: ops/const.py:52
+#: ops/const.py:52 ops/const.py:62
msgid "MySQL"
msgstr "MySQL"
-#: ops/const.py:53
+#: ops/const.py:53 ops/const.py:64
msgid "PostgreSQL"
msgstr "PostgreSQL"
-#: ops/const.py:54
+#: ops/const.py:54 ops/const.py:65
msgid "SQLServer"
msgstr "SQLServer"
-#: ops/const.py:55
+#: ops/const.py:55 ops/const.py:67
msgid "Raw"
msgstr ""
-#: ops/const.py:61
+#: ops/const.py:63
+msgid "MariaDB"
+msgstr "MariaDB"
+
+#: ops/const.py:66
+msgid "Oracle"
+msgstr "Oracle"
+
+#: ops/const.py:73
msgid "Timeout"
msgstr "タイムアウト"
@@ -3933,28 +3981,28 @@ msgstr "タイムアウト"
msgid "no valid program entry found."
msgstr "利用可能なプログラムポータルがありません"
-#: ops/mixin.py:26 ops/mixin.py:89 settings/serializers/auth/ldap.py:73
+#: ops/mixin.py:26 ops/mixin.py:90 settings/serializers/auth/ldap.py:73
msgid "Cycle perform"
msgstr "サイクル実行"
-#: ops/mixin.py:30 ops/mixin.py:87 ops/mixin.py:106
+#: ops/mixin.py:30 ops/mixin.py:88 ops/mixin.py:107
#: settings/serializers/auth/ldap.py:70
msgid "Regularly perform"
msgstr "定期的に実行する"
-#: ops/mixin.py:109
+#: ops/mixin.py:110
msgid "Interval"
msgstr "間隔"
-#: ops/mixin.py:119
+#: ops/mixin.py:120
msgid "* Please enter a valid crontab expression"
msgstr "* 有効なcrontab式を入力してください"
-#: ops/mixin.py:126
+#: ops/mixin.py:127
msgid "Range {} to {}"
msgstr "{} から {} までの範囲"
-#: ops/mixin.py:137
+#: ops/mixin.py:138
msgid "Require periodic or regularly perform setting"
msgstr "定期的または定期的に設定を行う必要があります"
@@ -4023,7 +4071,7 @@ msgstr "終了"
msgid "Date published"
msgstr "発売日"
-#: ops/models/celery.py:86
+#: ops/models/celery.py:87
msgid "Celery Task Execution"
msgstr "Celery タスク実行"
@@ -4123,23 +4171,23 @@ msgstr "時を過ごす"
msgid "Run ansible task"
msgstr "Ansible タスクを実行する"
-#: ops/tasks.py:63
+#: ops/tasks.py:68
msgid "Run ansible task execution"
msgstr "Ansible タスクの実行を開始する"
-#: ops/tasks.py:85
+#: ops/tasks.py:90
msgid "Clear celery periodic tasks"
msgstr "タスクログを定期的にクリアする"
-#: ops/tasks.py:106
+#: ops/tasks.py:111
msgid "Create or update periodic tasks"
msgstr "定期的なタスクの作成または更新"
-#: ops/tasks.py:114
+#: ops/tasks.py:119
msgid "Periodic check service performance"
msgstr "サービスのパフォーマンスを定期的に確認する"
-#: ops/tasks.py:120
+#: ops/tasks.py:125
msgid "Clean up unexpected jobs"
msgstr "例外ジョブのクリーンアップ"
@@ -4425,7 +4473,7 @@ msgid "Scope"
msgstr "スコープ"
#: rbac/models/role.py:46 rbac/models/rolebinding.py:52
-#: users/models/user.py:808
+#: users/models/user.py:805
msgid "Role"
msgstr "ロール"
@@ -7305,7 +7353,7 @@ msgstr "公開鍵は古いものと同じであってはなりません。"
msgid "Not a valid ssh public key"
msgstr "有効なssh公開鍵ではありません"
-#: users/forms/profile.py:173 users/models/user.py:831
+#: users/forms/profile.py:173 users/models/user.py:828
#: xpack/plugins/cloud/serializers/account_attrs.py:203
msgid "Public key"
msgstr "公開キー"
@@ -7314,73 +7362,73 @@ msgstr "公開キー"
msgid "Preference"
msgstr "ユーザー設定"
-#: users/models/user.py:648 users/serializers/profile.py:94
+#: users/models/user.py:645 users/serializers/profile.py:94
msgid "Force enable"
msgstr "強制有効"
-#: users/models/user.py:810 users/serializers/user.py:172
+#: users/models/user.py:807 users/serializers/user.py:172
msgid "Is service account"
msgstr "サービスアカウントです"
-#: users/models/user.py:812
+#: users/models/user.py:809
msgid "Avatar"
msgstr "アバター"
-#: users/models/user.py:815
+#: users/models/user.py:812
msgid "Wechat"
msgstr "微信"
-#: users/models/user.py:818 users/serializers/user.py:109
+#: users/models/user.py:815 users/serializers/user.py:109
msgid "Phone"
msgstr "電話"
-#: users/models/user.py:824
+#: users/models/user.py:821
msgid "OTP secret key"
msgstr "OTP 秘密"
-#: users/models/user.py:828
+#: users/models/user.py:825
#: xpack/plugins/cloud/serializers/account_attrs.py:206
msgid "Private key"
msgstr "ssh秘密鍵"
-#: users/models/user.py:836 users/serializers/profile.py:125
+#: users/models/user.py:833 users/serializers/profile.py:125
#: users/serializers/user.py:169
msgid "Is first login"
msgstr "最初のログインです"
-#: users/models/user.py:850
+#: users/models/user.py:847
msgid "Date password last updated"
msgstr "最終更新日パスワード"
-#: users/models/user.py:853
+#: users/models/user.py:850
msgid "Need update password"
msgstr "更新パスワードが必要"
-#: users/models/user.py:977
+#: users/models/user.py:974
msgid "Can not delete admin user"
msgstr "管理者ユーザーを削除できませんでした"
-#: users/models/user.py:1003
+#: users/models/user.py:1000
msgid "Can invite user"
msgstr "ユーザーを招待できます"
-#: users/models/user.py:1004
+#: users/models/user.py:1001
msgid "Can remove user"
msgstr "ユーザーを削除できます"
-#: users/models/user.py:1005
+#: users/models/user.py:1002
msgid "Can match user"
msgstr "ユーザーに一致できます"
-#: users/models/user.py:1014
+#: users/models/user.py:1011
msgid "Administrator"
msgstr "管理者"
-#: users/models/user.py:1017
+#: users/models/user.py:1014
msgid "Administrator is the super user of system"
msgstr "管理者はシステムのスーパーユーザーです"
-#: users/models/user.py:1042
+#: users/models/user.py:1039
msgid "User password history"
msgstr "ユーザーパスワード履歴"
@@ -7419,15 +7467,15 @@ msgstr "MFAのリセット"
msgid "File name conflict resolution"
msgstr "ファイル名競合ソリューション"
-#: users/serializers/preference/lina.py:11
+#: users/serializers/preference/lina.py:13
msgid "New file encryption password"
msgstr "新しいファイルの暗号化パスワード"
-#: users/serializers/preference/lina.py:16
+#: users/serializers/preference/lina.py:18
msgid "Confirm file encryption password"
msgstr "ファイルの暗号化パスワードを確認する"
-#: users/serializers/preference/lina.py:24 users/serializers/profile.py:48
+#: users/serializers/preference/lina.py:31 users/serializers/profile.py:48
msgid "The newly set password is inconsistent"
msgstr "新しく設定されたパスワードが一致しない"
diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo
index 3f9d48c80..a173d346d 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:78fa10c674b853ebde73bbdef255beeb794a7a7b4bf5483ac1464c282aab0819
-size 131200
+oid sha256:096cdc44514bd9f43b5e0062d878625c220ed7826a57a27968db3cb97e7eb011
+size 132403
diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po
index d6b011d9d..9bd900805 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: 2023-09-19 10:39+0800\n"
+"POT-Creation-Date: 2023-09-25 16:22+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler \n"
"Language-Team: JumpServer team\n"
@@ -23,9 +23,9 @@ msgstr "参数 'action' 必须是 [{}]"
#: accounts/const/account.py:6
#: accounts/serializers/automations/change_secret.py:32
-#: assets/models/_user.py:24 audits/signal_handlers/login_log.py:35
+#: assets/models/_user.py:24 audits/signal_handlers/login_log.py:37
#: authentication/confirm/password.py:9 authentication/forms.py:32
-#: authentication/templates/authentication/login.html:286
+#: authentication/templates/authentication/login.html:324
#: settings/serializers/auth/ldap.py:25 settings/serializers/auth/ldap.py:47
#: users/forms/profile.py:22 users/serializers/user.py:105
#: users/templates/users/_msg_user_created.html:13
@@ -70,7 +70,7 @@ msgstr "同名账号"
msgid "Anonymous account"
msgstr "匿名账号"
-#: accounts/const/account.py:25 users/models/user.py:744
+#: accounts/const/account.py:25 users/models/user.py:741
msgid "Local"
msgstr "数据库"
@@ -78,7 +78,7 @@ msgstr "数据库"
msgid "Collected"
msgstr "收集"
-#: accounts/const/account.py:27 accounts/serializers/account/account.py:27
+#: accounts/const/account.py:27 accounts/serializers/account/account.py:28
#: settings/serializers/auth/sms.py:75
msgid "Template"
msgstr "模板"
@@ -95,7 +95,7 @@ msgstr "更新"
#: accounts/const/account.py:33
#: accounts/serializers/automations/change_secret.py:155 audits/const.py:55
#: audits/signal_handlers/activity_log.py:33 common/const/choices.py:19
-#: ops/const.py:62 terminal/const.py:77 xpack/plugins/cloud/const.py:43
+#: ops/const.py:74 terminal/const.py:77 xpack/plugins/cloud/const.py:43
msgid "Failed"
msgstr "失败"
@@ -216,15 +216,15 @@ msgstr "用户 %s 查看/导出 了密码"
#: accounts/models/account.py:48
#: accounts/models/automations/gather_account.py:16
-#: accounts/serializers/account/account.py:205
-#: accounts/serializers/account/account.py:250
+#: accounts/serializers/account/account.py:209
+#: accounts/serializers/account/account.py:254
#: accounts/serializers/account/gathered_account.py:10
#: accounts/serializers/automations/change_secret.py:111
#: accounts/serializers/automations/change_secret.py:131
#: acls/serializers/base.py:123 assets/models/asset/common.py:93
#: assets/models/asset/common.py:334 assets/models/cmd_filter.py:36
#: assets/serializers/domain.py:19 assets/serializers/label.py:27
-#: audits/models.py:54 authentication/models/connection_token.py:36
+#: audits/models.py:56 authentication/models/connection_token.py:36
#: perms/models/asset_permission.py:64 perms/serializers/permission.py:34
#: terminal/backends/command/models.py:17 terminal/models/session/session.py:31
#: terminal/notifications.py:155 terminal/serializers/command.py:17
@@ -236,8 +236,8 @@ msgid "Asset"
msgstr "资产"
#: accounts/models/account.py:52 accounts/models/template.py:15
-#: accounts/serializers/account/account.py:212
-#: accounts/serializers/account/account.py:260
+#: accounts/serializers/account/account.py:216
+#: accounts/serializers/account/account.py:264
#: accounts/serializers/account/template.py:25
#: authentication/serializers/connect_token_secret.py:49
msgid "Su from"
@@ -249,8 +249,8 @@ msgstr "切换自"
msgid "Version"
msgstr "版本"
-#: accounts/models/account.py:56 accounts/serializers/account/account.py:207
-#: users/models/user.py:846
+#: accounts/models/account.py:56 accounts/serializers/account/account.py:211
+#: users/models/user.py:843
msgid "Source"
msgstr "来源"
@@ -262,7 +262,7 @@ msgstr "来源 ID"
#: accounts/serializers/automations/change_secret.py:112
#: accounts/serializers/automations/change_secret.py:132
#: acls/serializers/base.py:124 assets/serializers/asset/common.py:125
-#: assets/serializers/gateway.py:28 audits/models.py:55 ops/models/base.py:18
+#: assets/serializers/gateway.py:28 audits/models.py:57 ops/models/base.py:18
#: perms/models/asset_permission.py:70 perms/serializers/permission.py:39
#: terminal/backends/command/models.py:18 terminal/models/session/session.py:33
#: terminal/templates/terminal/_msg_command_warning.html:8
@@ -305,7 +305,7 @@ msgid "Account backup plan"
msgstr "账号备份计划"
#: accounts/models/automations/backup_account.py:91
-#: assets/models/automations/base.py:115 audits/models.py:61
+#: assets/models/automations/base.py:115 audits/models.py:63
#: ops/models/base.py:55 ops/models/celery.py:63 ops/models/job.py:228
#: ops/templates/ops/celery_task_log.html:75
#: perms/models/asset_permission.py:72 terminal/models/applet/host.py:140
@@ -333,7 +333,7 @@ msgstr "账号备份快照"
msgid "Trigger mode"
msgstr "触发模式"
-#: accounts/models/automations/backup_account.py:105 audits/models.py:195
+#: accounts/models/automations/backup_account.py:105 audits/models.py:197
#: terminal/models/session/sharing.py:125 xpack/plugins/cloud/models.py:205
msgid "Reason"
msgstr "原因"
@@ -419,10 +419,10 @@ msgid "Date finished"
msgstr "结束日期"
#: accounts/models/automations/change_secret.py:44
-#: accounts/serializers/account/account.py:252 assets/const/automation.py:8
+#: accounts/serializers/account/account.py:256 assets/const/automation.py:8
#: authentication/templates/authentication/passkey.html:173
-#: authentication/views/base.py:26 authentication/views/base.py:27
-#: authentication/views/base.py:28 common/const/choices.py:20
+#: authentication/views/base.py:27 authentication/views/base.py:28
+#: authentication/views/base.py:29 common/const/choices.py:20
msgid "Error"
msgstr "错误"
@@ -441,13 +441,13 @@ msgstr "最后登录日期"
#: accounts/models/automations/gather_account.py:17
#: accounts/models/automations/push_account.py:15 accounts/models/base.py:65
#: accounts/serializers/account/virtual.py:21 acls/serializers/base.py:19
-#: acls/serializers/base.py:50 assets/models/_user.py:23 audits/models.py:180
-#: authentication/forms.py:25 authentication/forms.py:27
-#: authentication/models/temp_token.py:9
+#: acls/serializers/base.py:50 acls/templates/acls/user_login_reminder.html:5
+#: assets/models/_user.py:23 audits/models.py:182 authentication/forms.py:25
+#: authentication/forms.py:27 authentication/models/temp_token.py:9
#: authentication/templates/authentication/_msg_different_city.html:9
#: authentication/templates/authentication/_msg_oauth_bind.html:9
#: users/forms/profile.py:32 users/forms/profile.py:115
-#: users/models/user.py:796 users/templates/users/_msg_user_created.html:12
+#: users/models/user.py:793 users/templates/users/_msg_user_created.html:12
#: xpack/plugins/cloud/serializers/account_attrs.py:26
msgid "Username"
msgstr "用户名"
@@ -475,7 +475,7 @@ msgstr "触发方式"
#: accounts/models/automations/push_account.py:16 acls/models/base.py:41
#: acls/serializers/base.py:57 assets/models/cmd_filter.py:81
-#: audits/models.py:88 audits/serializers.py:84
+#: audits/models.py:90 audits/serializers.py:84
#: authentication/serializers/connect_token_secret.py:116
#: authentication/templates/authentication/_access_key_modal.html:34
msgid "Action"
@@ -490,7 +490,7 @@ msgid "Verify asset account"
msgstr "账号验证"
#: accounts/models/base.py:37 accounts/models/base.py:67
-#: accounts/serializers/account/account.py:432
+#: accounts/serializers/account/account.py:436
#: accounts/serializers/account/base.py:16
#: accounts/serializers/automations/change_secret.py:45
#: authentication/serializers/connect_token_secret.py:41
@@ -536,7 +536,7 @@ msgstr "密码规则"
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:84 users/forms/profile.py:33
#: users/models/group.py:13 users/models/preference.py:11
-#: users/models/user.py:798 xpack/plugins/cloud/models.py:32
+#: users/models/user.py:795 xpack/plugins/cloud/models.py:32
#: xpack/plugins/cloud/models.py:273 xpack/plugins/cloud/serializers/task.py:68
msgid "Name"
msgstr "名称"
@@ -647,15 +647,15 @@ msgstr ""
"{} - 改密任务已完成: 未设置加密密码 - 请前往个人信息 -> 文件加密密码中设置加"
"密密码"
-#: accounts/serializers/account/account.py:30
+#: accounts/serializers/account/account.py:31
msgid "Push now"
msgstr "立即推送"
-#: accounts/serializers/account/account.py:37
+#: accounts/serializers/account/account.py:38
msgid "Exist policy"
msgstr "账号存在策略"
-#: accounts/serializers/account/account.py:185 applications/models.py:11
+#: accounts/serializers/account/account.py:189 applications/models.py:11
#: assets/models/label.py:21 assets/models/platform.py:89
#: assets/serializers/asset/common.py:121 assets/serializers/cagegory.py:8
#: assets/serializers/platform.py:133 assets/serializers/platform.py:229
@@ -664,7 +664,7 @@ msgstr "账号存在策略"
msgid "Category"
msgstr "类别"
-#: accounts/serializers/account/account.py:186
+#: accounts/serializers/account/account.py:190
#: accounts/serializers/automations/base.py:54 acls/models/command_acl.py:24
#: acls/serializers/command_acl.py:18 applications/models.py:14
#: assets/models/_user.py:50 assets/models/automations/base.py:20
@@ -684,26 +684,26 @@ msgstr "类别"
msgid "Type"
msgstr "类型"
-#: accounts/serializers/account/account.py:201
+#: accounts/serializers/account/account.py:205
msgid "Asset not found"
msgstr "资产不存在"
-#: accounts/serializers/account/account.py:241
+#: accounts/serializers/account/account.py:245
msgid "Has secret"
msgstr "已托管密码"
-#: accounts/serializers/account/account.py:251 ops/models/celery.py:60
+#: accounts/serializers/account/account.py:255 ops/models/celery.py:60
#: tickets/models/comment.py:13 tickets/models/ticket/general.py:45
#: tickets/models/ticket/general.py:279 tickets/serializers/super_ticket.py:14
#: tickets/serializers/ticket/ticket.py:21
msgid "State"
msgstr "状态"
-#: accounts/serializers/account/account.py:253
+#: accounts/serializers/account/account.py:257
msgid "Changed"
msgstr "已修改"
-#: accounts/serializers/account/account.py:263
+#: accounts/serializers/account/account.py:267
#: accounts/serializers/automations/base.py:22 acls/models/base.py:97
#: assets/models/automations/base.py:19
#: assets/serializers/automations/base.py:20 ops/models/base.py:17
@@ -712,29 +712,29 @@ msgstr "已修改"
msgid "Assets"
msgstr "资产"
-#: accounts/serializers/account/account.py:318
+#: accounts/serializers/account/account.py:322
msgid "Account already exists"
msgstr "账号已存在"
-#: accounts/serializers/account/account.py:368
+#: accounts/serializers/account/account.py:372
#, python-format
msgid "Asset does not support this secret type: %s"
msgstr "资产不支持账号类型: %s"
-#: accounts/serializers/account/account.py:400
+#: accounts/serializers/account/account.py:404
msgid "Account has exist"
msgstr "账号已存在"
-#: accounts/serializers/account/account.py:433
+#: accounts/serializers/account/account.py:437
#: authentication/serializers/connect_token_secret.py:156
#: authentication/templates/authentication/_access_key_modal.html:30
#: perms/models/perm_node.py:21 users/serializers/group.py:31
msgid "ID"
msgstr "ID"
-#: accounts/serializers/account/account.py:440 acls/serializers/base.py:116
-#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:50
-#: audits/models.py:86 audits/models.py:164 audits/models.py:262
+#: accounts/serializers/account/account.py:447 acls/serializers/base.py:116
+#: assets/models/cmd_filter.py:24 assets/models/label.py:16 audits/models.py:52
+#: audits/models.py:88 audits/models.py:166 audits/models.py:264
#: audits/serializers.py:171 authentication/models/connection_token.py:32
#: authentication/models/sso_token.py:16
#: notifications/models/notification.py:12
@@ -746,12 +746,12 @@ msgstr "ID"
#: terminal/notifications.py:205 terminal/serializers/command.py:16
#: terminal/templates/terminal/_msg_command_warning.html:6
#: terminal/templates/terminal/_msg_session_sharing.html:6
-#: tickets/models/comment.py:21 users/const.py:14 users/models/user.py:996
-#: users/models/user.py:1032 users/serializers/group.py:18
+#: tickets/models/comment.py:21 users/const.py:14 users/models/user.py:993
+#: users/models/user.py:1029 users/serializers/group.py:18
msgid "User"
msgstr "用户"
-#: accounts/serializers/account/account.py:441
+#: accounts/serializers/account/account.py:448
#: authentication/templates/authentication/_access_key_modal.html:33
#: terminal/notifications.py:158 terminal/notifications.py:207
msgid "Date"
@@ -759,7 +759,7 @@ msgstr "日期"
#: accounts/serializers/account/backup.py:31
#: accounts/serializers/automations/base.py:36
-#: assets/serializers/automations/base.py:34 ops/mixin.py:23 ops/mixin.py:103
+#: assets/serializers/automations/base.py:34 ops/mixin.py:23 ops/mixin.py:104
#: settings/serializers/auth/ldap.py:66
msgid "Periodic perform"
msgstr "定时执行"
@@ -796,28 +796,24 @@ msgstr ""
"username@domain"
#: accounts/serializers/account/template.py:11
-#, fuzzy
-#| msgid "Password strength"
msgid "Password length"
-msgstr "密码强度:"
+msgstr "密码长度"
#: accounts/serializers/account/template.py:12
-#, fuzzy
-#| msgid "Powershell"
msgid "Lowercase"
-msgstr "PowerShell"
+msgstr "小写字母"
#: accounts/serializers/account/template.py:13
msgid "Uppercase"
-msgstr ""
+msgstr "大写字母"
#: accounts/serializers/account/template.py:14
msgid "Digit"
-msgstr ""
+msgstr "数字"
#: accounts/serializers/account/template.py:15
msgid "Special symbol"
-msgstr ""
+msgstr "特殊字符"
#: accounts/serializers/account/template.py:36
msgid "Secret generation strategy for account creation"
@@ -842,7 +838,7 @@ msgstr "关联平台,可配置推送参数,如果不关联,将使用默认
#: terminal/models/component/endpoint.py:24
#: terminal/models/component/endpoint.py:104
#: terminal/models/session/session.py:46 tickets/models/comment.py:32
-#: tickets/models/ticket/general.py:297 users/models/user.py:834
+#: tickets/models/ticket/general.py:297 users/models/user.py:831
#: xpack/plugins/cloud/models.py:39 xpack/plugins/cloud/models.py:109
msgid "Comment"
msgstr "备注"
@@ -892,8 +888,8 @@ msgid "Automation task execution"
msgstr "自动化任务执行历史"
#: accounts/serializers/automations/change_secret.py:154 audits/const.py:54
-#: audits/models.py:60 audits/signal_handlers/activity_log.py:33
-#: common/const/choices.py:18 ops/const.py:60 ops/serializers/celery.py:40
+#: audits/models.py:62 audits/signal_handlers/activity_log.py:33
+#: common/const/choices.py:18 ops/const.py:72 ops/serializers/celery.py:40
#: terminal/const.py:76 terminal/models/session/sharing.py:121
#: tickets/views/approve.py:119
msgid "Success"
@@ -983,6 +979,10 @@ msgstr "审批"
msgid "Warning"
msgstr "告警"
+#: acls/const.py:10 notifications/apps.py:7
+msgid "Notifications"
+msgstr "通知"
+
#: acls/models/base.py:37 assets/models/_user.py:51
#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97
#: xpack/plugins/cloud/models.py:275
@@ -1094,6 +1094,10 @@ msgstr "登录资产访问控制"
msgid "Login asset confirm"
msgstr "登录资产复核"
+#: acls/notifications.py:10
+msgid "User login reminder"
+msgstr "用户登录提醒"
+
#: acls/serializers/base.py:11 acls/serializers/login_acl.py:11
msgid "With * indicating a match all. "
msgstr "* 表示匹配所有. "
@@ -1148,6 +1152,35 @@ msgstr "IP"
msgid "Time Period"
msgstr "时段"
+#: acls/templates/acls/user_login_reminder.html:3
+msgid "Respectful"
+msgstr "尊敬的"
+
+#: acls/templates/acls/user_login_reminder.html:7 audits/models.py:188
+#: audits/models.py:257
+#: authentication/templates/authentication/_msg_different_city.html:11
+#: tickets/models/ticket/login_confirm.py:11
+msgid "Login city"
+msgstr "登录城市"
+
+#: acls/templates/acls/user_login_reminder.html:8 audits/models.py:191
+#: audits/models.py:258 audits/serializers.py:65
+msgid "User agent"
+msgstr "用户代理"
+
+#: acls/templates/acls/user_login_reminder.html:11
+msgid ""
+"The user has just successfully logged into the system. Please ensure that "
+"this is an authorized operation. If you suspect that this is an unauthorized "
+"access, please take appropriate measures immediately."
+msgstr ""
+"用户刚刚成功登录到系统。请确保这是授权的操作。如果您怀疑这是一个未经授权的访"
+"问,请立即采取适当的措施。"
+
+#: acls/templates/acls/user_login_reminder.html:13
+msgid "Thank you"
+msgstr "谢谢"
+
#: applications/apps.py:9
msgid "Applications"
msgstr "应用管理"
@@ -1254,7 +1287,7 @@ msgstr "禁用"
#: assets/const/base.py:34 settings/serializers/basic.py:6
#: users/serializers/preference/koko.py:15
-#: users/serializers/preference/lina.py:32
+#: users/serializers/preference/lina.py:39
#: users/serializers/preference/luna.py:60
msgid "Basic"
msgstr "基本"
@@ -1467,19 +1500,19 @@ msgstr "SSH公钥"
# msgstr "备注"
#: assets/models/_user.py:28 assets/models/automations/base.py:114
#: assets/models/cmd_filter.py:41 assets/models/group.py:19
-#: audits/models.py:259 common/db/models.py:34 ops/models/base.py:54
-#: ops/models/job.py:227 users/models/user.py:1033
+#: audits/models.py:261 common/db/models.py:34 ops/models/base.py:54
+#: ops/models/job.py:227 users/models/user.py:1030
msgid "Date created"
msgstr "创建日期"
#: assets/models/_user.py:29 assets/models/cmd_filter.py:42
-#: common/db/models.py:35 users/models/user.py:855
+#: common/db/models.py:35 users/models/user.py:852
msgid "Date updated"
msgstr "更新日期"
#: assets/models/_user.py:30 assets/models/cmd_filter.py:44
#: assets/models/cmd_filter.py:91 assets/models/group.py:18
-#: common/db/models.py:32 users/models/user.py:841
+#: common/db/models.py:32 users/models/user.py:838
#: users/serializers/group.py:29
msgid "Created by"
msgstr "创建者"
@@ -1515,7 +1548,7 @@ msgstr "协议"
msgid "Sudo"
msgstr "Sudo"
-#: assets/models/_user.py:55 ops/const.py:49
+#: assets/models/_user.py:55 ops/const.py:49 ops/const.py:59
msgid "Shell"
msgstr "Shell"
@@ -1644,7 +1677,7 @@ msgstr "自动化任务"
msgid "Asset automation task"
msgstr "资产自动化任务"
-#: assets/models/automations/base.py:113 audits/models.py:200
+#: assets/models/automations/base.py:113 audits/models.py:202
#: audits/serializers.py:51 ops/models/base.py:49 ops/models/job.py:220
#: terminal/models/applet/applet.py:301 terminal/models/applet/host.py:139
#: terminal/models/component/status.py:30 terminal/serializers/applet.py:18
@@ -1673,7 +1706,7 @@ msgstr "校验日期"
#: assets/models/cmd_filter.py:28 perms/models/asset_permission.py:61
#: perms/serializers/permission.py:32 users/models/group.py:25
-#: users/models/user.py:804
+#: users/models/user.py:801
msgid "User group"
msgstr "用户组"
@@ -1723,11 +1756,11 @@ msgstr "默认"
msgid "Default asset group"
msgstr "默认资产组"
-#: assets/models/label.py:15 rbac/const.py:6 users/models/user.py:1018
+#: assets/models/label.py:15 rbac/const.py:6 users/models/user.py:1015
msgid "System"
msgstr "系统"
-#: assets/models/label.py:19 assets/models/node.py:544
+#: assets/models/label.py:19 assets/models/node.py:539
#: assets/serializers/cagegory.py:7 assets/serializers/cagegory.py:14
#: authentication/models/connection_token.py:29
#: authentication/serializers/connect_token_secret.py:122
@@ -1749,28 +1782,28 @@ msgstr "标签"
msgid "New node"
msgstr "新节点"
-#: assets/models/node.py:472 audits/backends/db.py:55 audits/backends/db.py:56
+#: assets/models/node.py:467 audits/backends/db.py:55 audits/backends/db.py:56
msgid "empty"
msgstr "空"
-#: assets/models/node.py:543 perms/models/perm_node.py:28
+#: assets/models/node.py:538 perms/models/perm_node.py:28
msgid "Key"
msgstr "键"
-#: assets/models/node.py:545 assets/serializers/node.py:20
+#: assets/models/node.py:540 assets/serializers/node.py:20
msgid "Full value"
msgstr "全称"
-#: assets/models/node.py:549 perms/models/perm_node.py:30
+#: assets/models/node.py:544 perms/models/perm_node.py:30
msgid "Parent key"
msgstr "ssh私钥"
-#: assets/models/node.py:558 perms/serializers/permission.py:35
+#: assets/models/node.py:553 perms/serializers/permission.py:35
#: tickets/models/ticket/apply_asset.py:14 xpack/plugins/cloud/models.py:322
msgid "Node"
msgstr "节点"
-#: assets/models/node.py:561
+#: assets/models/node.py:556
msgid "Can match node"
msgstr "可以匹配节点"
@@ -2221,8 +2254,8 @@ msgstr "创建"
msgid "Connect"
msgstr "连接"
-#: audits/const.py:30 authentication/templates/authentication/login.html:252
-#: authentication/templates/authentication/login.html:325
+#: audits/const.py:30 authentication/templates/authentication/login.html:290
+#: authentication/templates/authentication/login.html:363
#: templates/_header_bar.html:95
msgid "Login"
msgstr "登录"
@@ -2237,7 +2270,7 @@ msgstr "改密"
msgid "Terminal"
msgstr "终端"
-#: audits/const.py:41 audits/models.py:128
+#: audits/const.py:41 audits/models.py:130
msgid "Operate log"
msgstr "操作日志"
@@ -2266,28 +2299,28 @@ msgstr "是"
msgid "No"
msgstr "否"
-#: audits/models.py:43
+#: audits/models.py:45
msgid "Job audit log"
msgstr "作业审计日志"
-#: audits/models.py:52 audits/models.py:96 audits/models.py:167
+#: audits/models.py:54 audits/models.py:98 audits/models.py:169
#: terminal/models/session/session.py:38 terminal/models/session/sharing.py:113
msgid "Remote addr"
msgstr "远端地址"
-#: audits/models.py:57 audits/serializers.py:35
+#: audits/models.py:59 audits/serializers.py:35
msgid "Operate"
msgstr "操作"
-#: audits/models.py:59
+#: audits/models.py:61
msgid "Filename"
msgstr "文件名"
-#: audits/models.py:62 common/serializers/common.py:98
+#: audits/models.py:64 common/serializers/common.py:98
msgid "File"
msgstr "文件"
-#: audits/models.py:63 terminal/backends/command/models.py:21
+#: audits/models.py:65 terminal/backends/command/models.py:21
#: terminal/models/session/replay.py:9 terminal/models/session/sharing.py:20
#: terminal/models/session/sharing.py:95
#: terminal/templates/terminal/_msg_command_alert.html:10
@@ -2296,103 +2329,93 @@ msgstr "文件"
msgid "Session"
msgstr "会话"
-#: audits/models.py:66
+#: audits/models.py:68
msgid "File transfer log"
msgstr "文件管理"
-#: audits/models.py:90 audits/serializers.py:86
+#: audits/models.py:92 audits/serializers.py:86
msgid "Resource Type"
msgstr "资源类型"
-#: audits/models.py:91 audits/models.py:94 audits/models.py:140
+#: audits/models.py:93 audits/models.py:96 audits/models.py:142
#: audits/serializers.py:85
msgid "Resource"
msgstr "资源"
-#: audits/models.py:97 audits/models.py:143 audits/models.py:169
+#: audits/models.py:99 audits/models.py:145 audits/models.py:171
#: terminal/serializers/command.py:75
msgid "Datetime"
msgstr "日期"
-#: audits/models.py:136
+#: audits/models.py:138
msgid "Activity type"
msgstr "活动类型"
-#: audits/models.py:146
+#: audits/models.py:148
msgid "Detail"
msgstr "详情"
-#: audits/models.py:149
+#: audits/models.py:151
msgid "Detail ID"
msgstr "详情 ID"
-#: audits/models.py:153
+#: audits/models.py:155
msgid "Activity log"
msgstr "活动日志"
-#: audits/models.py:165
+#: audits/models.py:167
msgid "Change by"
msgstr "修改者"
-#: audits/models.py:175
+#: audits/models.py:177
msgid "Password change log"
msgstr "改密日志"
-#: audits/models.py:182 audits/models.py:257
+#: audits/models.py:184 audits/models.py:259
msgid "Login type"
msgstr "登录方式"
-#: audits/models.py:184 audits/models.py:253
+#: audits/models.py:186 audits/models.py:255
#: tickets/models/ticket/login_confirm.py:10
msgid "Login IP"
msgstr "登录 IP"
-#: audits/models.py:186 audits/models.py:255
-#: authentication/templates/authentication/_msg_different_city.html:11
-#: tickets/models/ticket/login_confirm.py:11
-msgid "Login city"
-msgstr "登录城市"
-
-#: audits/models.py:189 audits/models.py:256 audits/serializers.py:65
-msgid "User agent"
-msgstr "用户代理"
-
-#: audits/models.py:192 audits/serializers.py:49
+#: audits/models.py:194 audits/serializers.py:49
#: authentication/templates/authentication/_mfa_confirm_modal.html:14
-#: users/forms/profile.py:65 users/models/user.py:821
+#: users/forms/profile.py:65 users/models/user.py:818
#: users/serializers/profile.py:102
msgid "MFA"
msgstr "MFA"
-#: audits/models.py:202
+#: audits/models.py:204
msgid "Date login"
msgstr "登录日期"
-#: audits/models.py:204 audits/models.py:258 audits/serializers.py:67
+#: audits/models.py:206 audits/models.py:260 audits/serializers.py:67
#: audits/serializers.py:183
msgid "Authentication backend"
msgstr "认证方式"
-#: audits/models.py:248
+#: audits/models.py:250
msgid "User login log"
msgstr "用户登录日志"
-#: audits/models.py:254
+#: audits/models.py:256
msgid "Session key"
msgstr "会话标识"
-#: audits/models.py:260 authentication/models/connection_token.py:47
+#: audits/models.py:262 authentication/models/connection_token.py:47
#: authentication/models/temp_token.py:13 perms/models/asset_permission.py:74
#: tickets/models/ticket/apply_application.py:31
-#: tickets/models/ticket/apply_asset.py:20 users/models/user.py:839
+#: tickets/models/ticket/apply_asset.py:20 users/models/user.py:836
msgid "Date expired"
msgstr "失效日期"
-#: audits/models.py:278
+#: audits/models.py:288
msgid "User session"
msgstr "用户会话"
-#: audits/models.py:280
+#: audits/models.py:290
msgid "Offline ussr session"
msgstr "下限用户会话"
@@ -2420,46 +2443,46 @@ msgstr "用户 %s 登录系统 %s"
msgid "User %s perform a task for this resource: %s"
msgstr "用户 %s 在当前资源, 执行了任务 (%s)"
-#: audits/signal_handlers/login_log.py:34
+#: audits/signal_handlers/login_log.py:36
msgid "SSH Key"
msgstr "SSH 密钥"
-#: audits/signal_handlers/login_log.py:36 settings/serializers/auth/sso.py:13
+#: audits/signal_handlers/login_log.py:38 settings/serializers/auth/sso.py:13
msgid "SSO"
msgstr "SSO"
-#: audits/signal_handlers/login_log.py:37
+#: audits/signal_handlers/login_log.py:39
msgid "Auth Token"
msgstr "认证令牌"
-#: audits/signal_handlers/login_log.py:38 authentication/notifications.py:73
+#: audits/signal_handlers/login_log.py:40 authentication/notifications.py:73
#: authentication/views/login.py:77 authentication/views/wecom.py:159
#: notifications/backends/__init__.py:11 settings/serializers/auth/wecom.py:10
-#: users/models/user.py:751 users/models/user.py:856
+#: users/models/user.py:748 users/models/user.py:853
msgid "WeCom"
msgstr "企业微信"
-#: audits/signal_handlers/login_log.py:39 authentication/views/feishu.py:122
+#: audits/signal_handlers/login_log.py:41 authentication/views/feishu.py:122
#: authentication/views/login.py:89 notifications/backends/__init__.py:14
#: settings/serializers/auth/feishu.py:10
-#: settings/serializers/auth/feishu.py:13 users/models/user.py:753
-#: users/models/user.py:858
+#: settings/serializers/auth/feishu.py:13 users/models/user.py:750
+#: users/models/user.py:855
msgid "FeiShu"
msgstr "飞书"
-#: audits/signal_handlers/login_log.py:40 authentication/views/dingtalk.py:159
+#: audits/signal_handlers/login_log.py:42 authentication/views/dingtalk.py:159
#: authentication/views/login.py:83 notifications/backends/__init__.py:12
-#: settings/serializers/auth/dingtalk.py:10 users/models/user.py:752
-#: users/models/user.py:857
+#: settings/serializers/auth/dingtalk.py:10 users/models/user.py:749
+#: users/models/user.py:854
msgid "DingTalk"
msgstr "钉钉"
-#: audits/signal_handlers/login_log.py:41
+#: audits/signal_handlers/login_log.py:43
#: authentication/models/temp_token.py:16
msgid "Temporary token"
msgstr "临时密码"
-#: audits/signal_handlers/login_log.py:42 authentication/views/login.py:95
+#: audits/signal_handlers/login_log.py:44 authentication/views/login.py:95
#: settings/serializers/auth/passkey.py:8
msgid "Passkey"
msgstr ""
@@ -2520,7 +2543,7 @@ msgid ""
msgstr "用户来自 {} 请去相应系统修改密码"
#: authentication/api/password.py:64
-#: authentication/templates/authentication/login.html:317
+#: authentication/templates/authentication/login.html:355
#: users/templates/users/forgot_password.html:27
#: users/templates/users/forgot_password.html:28
#: users/templates/users/forgot_password_previewing.html:13
@@ -3024,7 +3047,7 @@ msgstr "已过期"
#: authentication/serializers/password_mfa.py:24
#: notifications/backends/__init__.py:10 settings/serializers/msg.py:22
#: settings/serializers/msg.py:57 users/forms/profile.py:102
-#: users/forms/profile.py:109 users/models/user.py:800
+#: users/forms/profile.py:109 users/models/user.py:797
#: users/templates/users/forgot_password.html:117
#: users/views/profile/reset.py:73
msgid "Email"
@@ -3062,13 +3085,13 @@ msgid "Show"
msgstr "显示"
#: authentication/templates/authentication/_access_key_modal.html:66
-#: users/models/user.py:646 users/serializers/profile.py:92
+#: users/models/user.py:643 users/serializers/profile.py:92
#: users/templates/users/user_verify_mfa.html:36
msgid "Disable"
msgstr "禁用"
#: authentication/templates/authentication/_access_key_modal.html:67
-#: users/models/user.py:647 users/serializers/profile.py:93
+#: users/models/user.py:644 users/serializers/profile.py:93
#: users/templates/users/mfa_setting.html:26
#: users/templates/users/mfa_setting.html:68
msgid "Enable"
@@ -3217,17 +3240,17 @@ msgstr "如果这次公钥更新不是由你发起的,那么你的账号可能
msgid "Cancel"
msgstr "取消"
-#: authentication/templates/authentication/login.html:237
+#: authentication/templates/authentication/login.html:270
msgid ""
"Configuration file has problems and cannot be logged in. Please contact the "
"administrator or view latest docs"
msgstr "配置文件有问题,无法登录,请联系管理员或查看最新文档"
-#: authentication/templates/authentication/login.html:238
+#: authentication/templates/authentication/login.html:271
msgid "If you are administrator, you can update the config resolve it, set"
msgstr "如果你是管理员,可以更新配置文件解决,设置配置项"
-#: authentication/templates/authentication/login.html:332
+#: authentication/templates/authentication/login.html:370
msgid "More login options"
msgstr "其他方式登录"
@@ -3278,7 +3301,7 @@ msgstr "是否重试 ?"
msgid "LAN"
msgstr "局域网"
-#: authentication/views/base.py:61
+#: authentication/views/base.py:67
#: perms/templates/perms/_msg_permed_items_expire.html:21
msgid "If you have any question, please contact the administrator"
msgstr "如果有疑问或需求,请联系系统管理员"
@@ -3434,7 +3457,7 @@ msgstr "准备"
msgid "Pending"
msgstr "待定的"
-#: common/const/choices.py:17 ops/const.py:59
+#: common/const/choices.py:17 ops/const.py:71
msgid "Running"
msgstr "运行中"
@@ -3518,7 +3541,7 @@ msgstr "忽略的"
msgid "discard time"
msgstr "忽略时间"
-#: common/db/models.py:33 users/models/user.py:842
+#: common/db/models.py:33 users/models/user.py:839
msgid "Updated by"
msgstr "最后更新者"
@@ -3739,10 +3762,6 @@ msgstr ""
"div>如果你看到了这个页面,证明你访问的不是nginx监听的端口,祝你好运"
"div>"
-#: notifications/apps.py:7
-msgid "Notifications"
-msgstr "通知"
-
#: notifications/backends/__init__.py:13
msgid "Site message"
msgstr "站内信"
@@ -3791,14 +3810,34 @@ msgstr "任务 {} 不存在"
msgid "Task {} args or kwargs error"
msgstr "任务 {} 执行参数错误"
-#: ops/api/playbook.py:37
+#: ops/api/playbook.py:39
msgid "Currently playbook is being used in a job"
msgstr "当前 playbook 正在作业中使用"
-#: ops/api/playbook.py:91
+#: ops/api/playbook.py:93
msgid "Unsupported file content"
msgstr "不支持的文件内容"
+#: ops/api/playbook.py:95 ops/api/playbook.py:141 ops/api/playbook.py:189
+msgid "Invalid file path"
+msgstr "无效的文件路径"
+
+#: ops/api/playbook.py:167
+msgid "This file can not be rename"
+msgstr "该文件不能重命名"
+
+#: ops/api/playbook.py:186
+msgid "File already exists"
+msgstr "文件已存在"
+
+#: ops/api/playbook.py:204
+msgid "File key is required"
+msgstr "文件密钥该字段是必填项。"
+
+#: ops/api/playbook.py:207
+msgid "This file can not be delete"
+msgstr "无法删除此文件"
+
#: ops/apps.py:9 ops/notifications.py:17 rbac/tree.py:55
msgid "App ops"
msgstr "作业中心"
@@ -3851,31 +3890,39 @@ msgstr "仅限特权账号"
msgid "Privileged First"
msgstr "特权账号优先"
-#: ops/const.py:50
+#: ops/const.py:50 ops/const.py:60
msgid "Powershell"
msgstr "PowerShell"
-#: ops/const.py:51
+#: ops/const.py:51 ops/const.py:61
msgid "Python"
msgstr "Python"
-#: ops/const.py:52
+#: ops/const.py:52 ops/const.py:62
msgid "MySQL"
msgstr "MySQL"
-#: ops/const.py:53
+#: ops/const.py:53 ops/const.py:64
msgid "PostgreSQL"
msgstr "PostgreSQL"
-#: ops/const.py:54
+#: ops/const.py:54 ops/const.py:65
msgid "SQLServer"
msgstr "SQLServer"
-#: ops/const.py:55
+#: ops/const.py:55 ops/const.py:67
msgid "Raw"
-msgstr ""
+msgstr "Raw"
-#: ops/const.py:61
+#: ops/const.py:63
+msgid "MariaDB"
+msgstr "MariaDB"
+
+#: ops/const.py:66
+msgid "Oracle"
+msgstr "Oracle"
+
+#: ops/const.py:73
msgid "Timeout"
msgstr "超时"
@@ -3883,28 +3930,28 @@ msgstr "超时"
msgid "no valid program entry found."
msgstr "没有可用程序入口"
-#: ops/mixin.py:26 ops/mixin.py:89 settings/serializers/auth/ldap.py:73
+#: ops/mixin.py:26 ops/mixin.py:90 settings/serializers/auth/ldap.py:73
msgid "Cycle perform"
msgstr "周期执行"
-#: ops/mixin.py:30 ops/mixin.py:87 ops/mixin.py:106
+#: ops/mixin.py:30 ops/mixin.py:88 ops/mixin.py:107
#: settings/serializers/auth/ldap.py:70
msgid "Regularly perform"
msgstr "定期执行"
-#: ops/mixin.py:109
+#: ops/mixin.py:110
msgid "Interval"
msgstr "间隔"
-#: ops/mixin.py:119
+#: ops/mixin.py:120
msgid "* Please enter a valid crontab expression"
msgstr "* 请输入有效的 crontab 表达式"
-#: ops/mixin.py:126
+#: ops/mixin.py:127
msgid "Range {} to {}"
msgstr "输入在 {} - {} 范围之间"
-#: ops/mixin.py:137
+#: ops/mixin.py:138
msgid "Require periodic or regularly perform setting"
msgstr "需要周期或定期设置"
@@ -3973,7 +4020,7 @@ msgstr "结束"
msgid "Date published"
msgstr "发布日期"
-#: ops/models/celery.py:86
+#: ops/models/celery.py:87
msgid "Celery Task Execution"
msgstr "Celery 任务执行"
@@ -4073,23 +4120,23 @@ msgstr "花费时间"
msgid "Run ansible task"
msgstr "运行 Ansible 任务"
-#: ops/tasks.py:63
+#: ops/tasks.py:68
msgid "Run ansible task execution"
msgstr "开始执行 Ansible 任务"
-#: ops/tasks.py:85
+#: ops/tasks.py:90
msgid "Clear celery periodic tasks"
msgstr "清理周期任务"
-#: ops/tasks.py:106
+#: ops/tasks.py:111
msgid "Create or update periodic tasks"
msgstr "创建或更新周期任务"
-#: ops/tasks.py:114
+#: ops/tasks.py:119
msgid "Periodic check service performance"
msgstr "周期检测服务性能"
-#: ops/tasks.py:120
+#: ops/tasks.py:125
msgid "Clean up unexpected jobs"
msgstr "清理异常作业"
@@ -4374,7 +4421,7 @@ msgid "Scope"
msgstr "范围"
#: rbac/models/role.py:46 rbac/models/rolebinding.py:52
-#: users/models/user.py:808
+#: users/models/user.py:805
msgid "Role"
msgstr "角色"
@@ -7203,7 +7250,7 @@ msgstr "不能和原来的密钥相同"
msgid "Not a valid ssh public key"
msgstr "SSH密钥不合法"
-#: users/forms/profile.py:173 users/models/user.py:831
+#: users/forms/profile.py:173 users/models/user.py:828
#: xpack/plugins/cloud/serializers/account_attrs.py:203
msgid "Public key"
msgstr "SSH公钥"
@@ -7212,73 +7259,73 @@ msgstr "SSH公钥"
msgid "Preference"
msgstr "用户设置"
-#: users/models/user.py:648 users/serializers/profile.py:94
+#: users/models/user.py:645 users/serializers/profile.py:94
msgid "Force enable"
msgstr "强制启用"
-#: users/models/user.py:810 users/serializers/user.py:172
+#: users/models/user.py:807 users/serializers/user.py:172
msgid "Is service account"
msgstr "服务账号"
-#: users/models/user.py:812
+#: users/models/user.py:809
msgid "Avatar"
msgstr "头像"
-#: users/models/user.py:815
+#: users/models/user.py:812
msgid "Wechat"
msgstr "微信"
-#: users/models/user.py:818 users/serializers/user.py:109
+#: users/models/user.py:815 users/serializers/user.py:109
msgid "Phone"
msgstr "手机"
-#: users/models/user.py:824
+#: users/models/user.py:821
msgid "OTP secret key"
msgstr "OTP 密钥"
-#: users/models/user.py:828
+#: users/models/user.py:825
#: xpack/plugins/cloud/serializers/account_attrs.py:206
msgid "Private key"
msgstr "ssh私钥"
-#: users/models/user.py:836 users/serializers/profile.py:125
+#: users/models/user.py:833 users/serializers/profile.py:125
#: users/serializers/user.py:169
msgid "Is first login"
msgstr "首次登录"
-#: users/models/user.py:850
+#: users/models/user.py:847
msgid "Date password last updated"
msgstr "最后更新密码日期"
-#: users/models/user.py:853
+#: users/models/user.py:850
msgid "Need update password"
msgstr "需要更新密码"
-#: users/models/user.py:977
+#: users/models/user.py:974
msgid "Can not delete admin user"
msgstr "无法删除管理员用户"
-#: users/models/user.py:1003
+#: users/models/user.py:1000
msgid "Can invite user"
msgstr "可以邀请用户"
-#: users/models/user.py:1004
+#: users/models/user.py:1001
msgid "Can remove user"
msgstr "可以移除用户"
-#: users/models/user.py:1005
+#: users/models/user.py:1002
msgid "Can match user"
msgstr "可以匹配用户"
-#: users/models/user.py:1014
+#: users/models/user.py:1011
msgid "Administrator"
msgstr "管理员"
-#: users/models/user.py:1017
+#: users/models/user.py:1014
msgid "Administrator is the super user of system"
msgstr "Administrator是初始的超级管理员"
-#: users/models/user.py:1042
+#: users/models/user.py:1039
msgid "User password history"
msgstr "用户密码历史"
@@ -7317,15 +7364,15 @@ msgstr "重置 MFA"
msgid "File name conflict resolution"
msgstr "文件名冲突解决方案"
-#: users/serializers/preference/lina.py:11
+#: users/serializers/preference/lina.py:13
msgid "New file encryption password"
msgstr "文件加密密码"
-#: users/serializers/preference/lina.py:16
+#: users/serializers/preference/lina.py:18
msgid "Confirm file encryption password"
msgstr "确认文件加密密码"
-#: users/serializers/preference/lina.py:24 users/serializers/profile.py:48
+#: users/serializers/preference/lina.py:31 users/serializers/profile.py:48
msgid "The newly set password is inconsistent"
msgstr "两次密码不一致"
diff --git a/apps/tickets/handlers/base.py b/apps/tickets/handlers/base.py
index fbf6a8e46..c1378da89 100644
--- a/apps/tickets/handlers/base.py
+++ b/apps/tickets/handlers/base.py
@@ -98,7 +98,7 @@ class BaseHandler:
context = self._diff_prev_approve_context(state)
context.update({'approve_info': approve_info})
body = self.safe_html_script(
- render_to_string('tickets/ticket_approve_diff.html', context)
+ render_to_string('tickets/user_login_reminder.html', context)
)
data = {
'body': body,