校验用户名长度和特殊字符 (#1271)

* [Bugfix] 修复系统用户用户名校验问题

* [Update] 增加长度限制
pull/1272/head^2
老广 2018-04-27 11:27:16 +08:00 committed by GitHub
parent e476cab2a1
commit 6f494ef09c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 107 additions and 146 deletions

View File

@ -10,6 +10,7 @@ from django.utils.translation import ugettext_lazy as _
from django.conf import settings from django.conf import settings
from common.utils import get_signer, ssh_key_string_to_obj, ssh_key_gen from common.utils import get_signer, ssh_key_string_to_obj, ssh_key_gen
from common.validators import alphanumeric
from .utils import private_key_validator from .utils import private_key_validator
signer = get_signer() signer = get_signer()
@ -18,7 +19,7 @@ signer = get_signer()
class AssetUser(models.Model): class AssetUser(models.Model):
id = models.UUIDField(default=uuid.uuid4, primary_key=True) id = models.UUIDField(default=uuid.uuid4, primary_key=True)
name = models.CharField(max_length=128, unique=True, verbose_name=_('Name')) name = models.CharField(max_length=128, unique=True, verbose_name=_('Name'))
username = models.CharField(max_length=128, verbose_name=_('Username')) username = models.CharField(max_length=32, verbose_name=_('Username'), validators=[alphanumeric])
_password = models.CharField(max_length=256, blank=True, null=True, verbose_name=_('Password')) _password = models.CharField(max_length=256, blank=True, null=True, verbose_name=_('Password'))
_private_key = models.TextField(max_length=4096, blank=True, null=True, verbose_name=_('SSH private key'), validators=[private_key_validator, ]) _private_key = models.TextField(max_length=4096, blank=True, null=True, verbose_name=_('SSH private key'), validators=[private_key_validator, ])
_public_key = models.TextField(max_length=4096, blank=True, verbose_name=_('SSH public key')) _public_key = models.TextField(max_length=4096, blank=True, verbose_name=_('SSH public key'))

View File

@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
#
from django.core.validators import RegexValidator
from django.utils.translation import ugettext_lazy as _
alphanumeric = RegexValidator(r'^[0-9a-zA-Z_-]*$', _('Special char not allowed'))

Binary file not shown.

View File

@ -8,7 +8,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: 2018-04-26 19:15+0800\n" "POT-Creation-Date: 2018-04-27 11:16+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\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"
@ -21,11 +21,11 @@ msgstr ""
msgid "New node {}" msgid "New node {}"
msgstr "新节点 {}" msgstr "新节点 {}"
#: assets/api/node.py:216 #: assets/api/node.py:217
msgid "更新节点资产硬件信息: {}" msgid "更新节点资产硬件信息: {}"
msgstr "" msgstr ""
#: assets/api/node.py:229 #: assets/api/node.py:230
msgid "测试节点下资产是否可连接: {}" msgid "测试节点下资产是否可连接: {}"
msgstr "" msgstr ""
@ -110,7 +110,7 @@ msgstr "端口"
#: perms/templates/perms/asset_permission_create_update.html:40 #: perms/templates/perms/asset_permission_create_update.html:40
#: perms/templates/perms/asset_permission_list.html:56 #: perms/templates/perms/asset_permission_list.html:56
#: perms/templates/perms/asset_permission_list.html:139 #: perms/templates/perms/asset_permission_list.html:139
#: terminal/backends/command/models.py:11 terminal/models.py:123 #: terminal/backends/command/models.py:11 terminal/models.py:127
#: terminal/templates/terminal/command_list.html:40 #: terminal/templates/terminal/command_list.html:40
#: terminal/templates/terminal/command_list.html:73 #: terminal/templates/terminal/command_list.html:73
#: terminal/templates/terminal/session_list.html:41 #: terminal/templates/terminal/session_list.html:41
@ -119,7 +119,7 @@ msgid "Asset"
msgstr "资产" msgstr "资产"
#: assets/forms/domain.py:54 assets/forms/user.py:79 assets/forms/user.py:120 #: assets/forms/domain.py:54 assets/forms/user.py:79 assets/forms/user.py:120
#: assets/models/base.py:20 assets/models/cluster.py:18 #: assets/models/base.py:21 assets/models/cluster.py:18
#: assets/models/domain.py:17 assets/models/group.py:20 #: assets/models/domain.py:17 assets/models/group.py:20
#: assets/models/label.py:17 assets/templates/assets/admin_user_detail.html:56 #: assets/models/label.py:17 assets/templates/assets/admin_user_detail.html:56
#: assets/templates/assets/admin_user_list.html:23 #: assets/templates/assets/admin_user_list.html:23
@ -128,14 +128,14 @@ msgstr "资产"
#: assets/templates/assets/domain_list.html:14 #: assets/templates/assets/domain_list.html:14
#: assets/templates/assets/label_list.html:14 #: assets/templates/assets/label_list.html:14
#: assets/templates/assets/system_user_detail.html:58 #: assets/templates/assets/system_user_detail.html:58
#: assets/templates/assets/system_user_list.html:26 common/forms.py:179 #: assets/templates/assets/system_user_list.html:26 common/models.py:26
#: common/models.py:26 common/templates/common/terminal_setting.html:70 #: common/templates/common/terminal_setting.html:67
#: common/templates/common/terminal_setting.html:88 ops/models/adhoc.py:36 #: common/templates/common/terminal_setting.html:85 ops/models/adhoc.py:36
#: ops/templates/ops/task_detail.html:59 ops/templates/ops/task_list.html:35 #: ops/templates/ops/task_detail.html:59 ops/templates/ops/task_list.html:35
#: perms/models.py:19 perms/templates/perms/asset_permission_detail.html:62 #: perms/models.py:19 perms/templates/perms/asset_permission_detail.html:62
#: perms/templates/perms/asset_permission_list.html:53 #: perms/templates/perms/asset_permission_list.html:53
#: perms/templates/perms/asset_permission_user.html:54 terminal/models.py:16 #: perms/templates/perms/asset_permission_user.html:54 terminal/models.py:16
#: terminal/models.py:149 terminal/templates/terminal/terminal_detail.html:43 #: terminal/models.py:154 terminal/templates/terminal/terminal_detail.html:43
#: terminal/templates/terminal/terminal_list.html:29 users/models/group.py:14 #: terminal/templates/terminal/terminal_list.html:29 users/models/group.py:14
#: users/models/user.py:42 users/templates/users/_select_user_modal.html:13 #: users/models/user.py:42 users/templates/users/_select_user_modal.html:13
#: users/templates/users/user_detail.html:63 #: users/templates/users/user_detail.html:63
@ -148,7 +148,7 @@ msgid "Name"
msgstr "名称" msgstr "名称"
#: assets/forms/domain.py:55 assets/forms/user.py:80 assets/forms/user.py:121 #: assets/forms/domain.py:55 assets/forms/user.py:80 assets/forms/user.py:121
#: assets/models/base.py:21 assets/templates/assets/admin_user_detail.html:60 #: assets/models/base.py:22 assets/templates/assets/admin_user_detail.html:60
#: assets/templates/assets/admin_user_list.html:24 #: assets/templates/assets/admin_user_list.html:24
#: assets/templates/assets/domain_gateway_list.html:60 #: assets/templates/assets/domain_gateway_list.html:60
#: assets/templates/assets/system_user_detail.html:62 #: assets/templates/assets/system_user_detail.html:62
@ -168,7 +168,7 @@ msgstr "用户名"
msgid "Password or private key passphrase" msgid "Password or private key passphrase"
msgstr "密码或密钥密码" msgstr "密码或密钥密码"
#: assets/forms/user.py:25 assets/models/base.py:22 common/forms.py:114 #: assets/forms/user.py:25 assets/models/base.py:23 common/forms.py:113
#: users/forms.py:15 users/forms.py:23 users/forms.py:32 users/forms.py:44 #: users/forms.py:15 users/forms.py:23 users/forms.py:32 users/forms.py:44
#: users/templates/users/login.html:59 #: users/templates/users/login.html:59
#: users/templates/users/reset_password.html:52 #: users/templates/users/reset_password.html:52
@ -209,7 +209,7 @@ msgstr "高优先级的系统用户将会作为默认登录用户"
#: assets/templates/assets/asset_list.html:87 #: assets/templates/assets/asset_list.html:87
#: assets/templates/assets/domain_gateway_list.html:57 #: assets/templates/assets/domain_gateway_list.html:57
#: assets/templates/assets/system_user_asset.html:50 #: assets/templates/assets/system_user_asset.html:50
#: assets/templates/assets/user_asset_list.html:46 common/forms.py:145 #: assets/templates/assets/user_asset_list.html:46 common/forms.py:144
#: perms/templates/perms/asset_permission_asset.html:55 #: perms/templates/perms/asset_permission_asset.html:55
#: users/templates/users/login_log_list.html:52 #: users/templates/users/login_log_list.html:52
#: users/templates/users/user_granted_asset.html:45 #: users/templates/users/user_granted_asset.html:45
@ -222,7 +222,7 @@ msgstr "IP"
#: assets/templates/assets/asset_detail.html:57 #: assets/templates/assets/asset_detail.html:57
#: assets/templates/assets/asset_list.html:86 #: assets/templates/assets/asset_list.html:86
#: assets/templates/assets/system_user_asset.html:49 #: assets/templates/assets/system_user_asset.html:49
#: assets/templates/assets/user_asset_list.html:45 common/forms.py:144 #: assets/templates/assets/user_asset_list.html:45 common/forms.py:143
#: perms/templates/perms/asset_permission_asset.html:54 #: perms/templates/perms/asset_permission_asset.html:54
#: users/templates/users/user_granted_asset.html:44 #: users/templates/users/user_granted_asset.html:44
#: users/templates/users/user_group_granted_asset.html:44 #: users/templates/users/user_group_granted_asset.html:44
@ -304,7 +304,7 @@ msgstr "主机名原始"
msgid "Labels" msgid "Labels"
msgstr "标签管理" msgstr "标签管理"
#: assets/models/asset.py:82 assets/models/base.py:28 #: assets/models/asset.py:82 assets/models/base.py:29
#: assets/models/cluster.py:28 assets/models/group.py:21 #: assets/models/cluster.py:28 assets/models/group.py:21
#: assets/templates/assets/admin_user_detail.html:68 #: assets/templates/assets/admin_user_detail.html:68
#: assets/templates/assets/asset_detail.html:117 #: assets/templates/assets/asset_detail.html:117
@ -329,7 +329,7 @@ msgstr "创建者"
msgid "Date created" msgid "Date created"
msgstr "创建日期" msgstr "创建日期"
#: assets/models/asset.py:84 assets/models/base.py:25 #: assets/models/asset.py:84 assets/models/base.py:26
#: assets/models/cluster.py:29 assets/models/domain.py:18 #: assets/models/cluster.py:29 assets/models/domain.py:18
#: assets/models/domain.py:47 assets/models/group.py:23 #: assets/models/domain.py:47 assets/models/group.py:23
#: assets/models/label.py:21 assets/templates/assets/admin_user_detail.html:72 #: assets/models/label.py:21 assets/templates/assets/admin_user_detail.html:72
@ -350,11 +350,11 @@ msgstr "创建日期"
msgid "Comment" msgid "Comment"
msgstr "备注" msgstr "备注"
#: assets/models/base.py:23 #: assets/models/base.py:24
msgid "SSH private key" msgid "SSH private key"
msgstr "ssh密钥" msgstr "ssh密钥"
#: assets/models/base.py:24 #: assets/models/base.py:25
msgid "SSH public key" msgid "SSH public key"
msgstr "ssh公钥" msgstr "ssh公钥"
@ -408,6 +408,7 @@ msgstr "集群"
#: assets/templates/assets/domain_gateway_list.html:59 #: assets/templates/assets/domain_gateway_list.html:59
#: assets/templates/assets/system_user_detail.html:66 #: assets/templates/assets/system_user_detail.html:66
#: assets/templates/assets/system_user_list.html:28 #: assets/templates/assets/system_user_list.html:28
#: terminal/templates/terminal/session_list.html:75
msgid "Protocol" msgid "Protocol"
msgstr "协议" msgstr "协议"
@ -426,7 +427,7 @@ msgstr "默认资产组"
#: perms/templates/perms/asset_permission_create_update.html:36 #: perms/templates/perms/asset_permission_create_update.html:36
#: perms/templates/perms/asset_permission_list.html:54 #: perms/templates/perms/asset_permission_list.html:54
#: perms/templates/perms/asset_permission_list.html:133 #: perms/templates/perms/asset_permission_list.html:133
#: terminal/backends/command/models.py:10 terminal/models.py:122 #: terminal/backends/command/models.py:10 terminal/models.py:126
#: terminal/templates/terminal/command_list.html:32 #: terminal/templates/terminal/command_list.html:32
#: terminal/templates/terminal/command_list.html:72 #: terminal/templates/terminal/command_list.html:72
#: terminal/templates/terminal/session_list.html:33 #: terminal/templates/terminal/session_list.html:33
@ -493,7 +494,7 @@ msgstr "Shell"
#: perms/templates/perms/asset_permission_detail.html:140 #: perms/templates/perms/asset_permission_detail.html:140
#: perms/templates/perms/asset_permission_list.html:58 #: perms/templates/perms/asset_permission_list.html:58
#: perms/templates/perms/asset_permission_list.html:145 templates/_nav.html:26 #: perms/templates/perms/asset_permission_list.html:145 templates/_nav.html:26
#: terminal/backends/command/models.py:12 terminal/models.py:124 #: terminal/backends/command/models.py:12 terminal/models.py:128
#: terminal/templates/terminal/command_list.html:48 #: terminal/templates/terminal/command_list.html:48
#: terminal/templates/terminal/command_list.html:74 #: terminal/templates/terminal/command_list.html:74
#: terminal/templates/terminal/session_list.html:49 #: terminal/templates/terminal/session_list.html:49
@ -561,7 +562,6 @@ msgid "Select System Users"
msgstr "选择系统用户" msgstr "选择系统用户"
#: assets/templates/assets/_asset_group_bulk_update_modal.html:34 #: assets/templates/assets/_asset_group_bulk_update_modal.html:34
#, fuzzy
msgid "Enable-MFA" msgid "Enable-MFA"
msgstr "启用MFA" msgstr "启用MFA"
@ -630,11 +630,10 @@ msgstr "其它"
#: assets/templates/assets/domain_create_update.html:16 #: assets/templates/assets/domain_create_update.html:16
#: assets/templates/assets/gateway_create_update.html:58 #: assets/templates/assets/gateway_create_update.html:58
#: assets/templates/assets/label_create_update.html:18 #: assets/templates/assets/label_create_update.html:18
#: common/templates/common/basic_setting.html:61 #: common/templates/common/basic_setting.html:58
#: common/templates/common/cloud_setting.html:74 #: common/templates/common/email_setting.html:59
#: common/templates/common/email_setting.html:62 #: common/templates/common/ldap_setting.html:59
#: common/templates/common/ldap_setting.html:62 #: common/templates/common/terminal_setting.html:101
#: common/templates/common/terminal_setting.html:104
#: perms/templates/perms/asset_permission_create_update.html:69 #: perms/templates/perms/asset_permission_create_update.html:69
#: terminal/templates/terminal/terminal_update.html:47 #: terminal/templates/terminal/terminal_update.html:47
#: users/templates/users/_user.html:46 #: users/templates/users/_user.html:46
@ -656,11 +655,10 @@ msgstr "重置"
#: assets/templates/assets/domain_create_update.html:17 #: assets/templates/assets/domain_create_update.html:17
#: assets/templates/assets/gateway_create_update.html:59 #: assets/templates/assets/gateway_create_update.html:59
#: assets/templates/assets/label_create_update.html:19 #: assets/templates/assets/label_create_update.html:19
#: common/templates/common/basic_setting.html:62 #: common/templates/common/basic_setting.html:59
#: common/templates/common/cloud_setting.html:76 #: common/templates/common/email_setting.html:60
#: common/templates/common/email_setting.html:63 #: common/templates/common/ldap_setting.html:60
#: common/templates/common/ldap_setting.html:63 #: common/templates/common/terminal_setting.html:103
#: common/templates/common/terminal_setting.html:106
#: perms/templates/perms/asset_permission_create_update.html:70 #: perms/templates/perms/asset_permission_create_update.html:70
#: terminal/templates/terminal/session_list.html:120 #: terminal/templates/terminal/session_list.html:120
#: terminal/templates/terminal/terminal_update.html:48 #: terminal/templates/terminal/terminal_update.html:48
@ -1027,8 +1025,8 @@ msgid "Create gateway"
msgstr "创建网关" msgstr "创建网关"
#: assets/templates/assets/domain_gateway_list.html:87 #: assets/templates/assets/domain_gateway_list.html:87
#: common/templates/common/email_setting.html:61 #: common/templates/common/email_setting.html:58
#: common/templates/common/ldap_setting.html:61 #: common/templates/common/ldap_setting.html:58
msgid "Test connection" msgid "Test connection"
msgstr "测试连接" msgstr "测试连接"
@ -1178,7 +1176,7 @@ msgid "System user asset"
msgstr "系统用户集群资产" msgstr "系统用户集群资产"
#: audits/models.py:10 audits/templates/audits/ftp_log_list.html:74 #: audits/models.py:10 audits/templates/audits/ftp_log_list.html:74
#: terminal/models.py:126 terminal/templates/terminal/session_list.html:74 #: terminal/models.py:130 terminal/templates/terminal/session_list.html:74
#: terminal/templates/terminal/terminal_detail.html:47 #: terminal/templates/terminal/terminal_detail.html:47
msgid "Remote addr" msgid "Remote addr"
msgstr "远端地址" msgstr "远端地址"
@ -1201,7 +1199,7 @@ msgstr "成功"
#: ops/templates/ops/adhoc_history.html:52 #: ops/templates/ops/adhoc_history.html:52
#: ops/templates/ops/adhoc_history_detail.html:61 #: ops/templates/ops/adhoc_history_detail.html:61
#: ops/templates/ops/task_history.html:58 perms/models.py:26 #: ops/templates/ops/task_history.html:58 perms/models.py:26
#: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:132 #: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:137
#: terminal/templates/terminal/session_list.html:77 #: terminal/templates/terminal/session_list.html:77
msgid "Date start" msgid "Date start"
msgstr "开始日期" msgstr "开始日期"
@ -1248,84 +1246,84 @@ msgstr "不是字符类型"
msgid "Encrypt field using Secret Key" msgid "Encrypt field using Secret Key"
msgstr "" msgstr ""
#: common/forms.py:71 #: common/forms.py:70
msgid "Current SITE URL" msgid "Current SITE URL"
msgstr "当前站点URL" msgstr "当前站点URL"
#: common/forms.py:75 #: common/forms.py:74
msgid "User Guide URL" msgid "User Guide URL"
msgstr "用户向导URL" msgstr "用户向导URL"
#: common/forms.py:76 #: common/forms.py:75
msgid "User first login update profile done redirect to it" msgid "User first login update profile done redirect to it"
msgstr "用户第一次登录修改profile后重定向到地址" msgstr "用户第一次登录修改profile后重定向到地址"
#: common/forms.py:79 #: common/forms.py:78
msgid "Email Subject Prefix" msgid "Email Subject Prefix"
msgstr "Email主题前缀" msgstr "Email主题前缀"
#: common/forms.py:86 #: common/forms.py:85
msgid "SMTP host" msgid "SMTP host"
msgstr "SMTP主机" msgstr "SMTP主机"
#: common/forms.py:88 #: common/forms.py:87
msgid "SMTP port" msgid "SMTP port"
msgstr "SMTP端口" msgstr "SMTP端口"
#: common/forms.py:90 #: common/forms.py:89
msgid "SMTP user" msgid "SMTP user"
msgstr "SMTP账号" msgstr "SMTP账号"
#: common/forms.py:93 #: common/forms.py:92
msgid "SMTP password" msgid "SMTP password"
msgstr "SMTP密码" msgstr "SMTP密码"
#: common/forms.py:94 #: common/forms.py:93
msgid "Some provider use token except password" msgid "Some provider use token except password"
msgstr "一些邮件提供商需要输入的是Token" msgstr "一些邮件提供商需要输入的是Token"
#: common/forms.py:97 common/forms.py:137 #: common/forms.py:96 common/forms.py:136
msgid "Use SSL" msgid "Use SSL"
msgstr "使用SSL" msgstr "使用SSL"
#: common/forms.py:98 #: common/forms.py:97
msgid "If SMTP port is 465, may be select" msgid "If SMTP port is 465, may be select"
msgstr "如果SMTP端口是465通常需要启用SSL" msgstr "如果SMTP端口是465通常需要启用SSL"
#: common/forms.py:101 #: common/forms.py:100
msgid "Use TLS" msgid "Use TLS"
msgstr "使用TLS" msgstr "使用TLS"
#: common/forms.py:102 #: common/forms.py:101
msgid "If SMTP port is 587, may be select" msgid "If SMTP port is 587, may be select"
msgstr "如果SMTP端口是587通常需要启用TLS" msgstr "如果SMTP端口是587通常需要启用TLS"
#: common/forms.py:108 #: common/forms.py:107
msgid "LDAP server" msgid "LDAP server"
msgstr "LDAP地址" msgstr "LDAP地址"
#: common/forms.py:111 #: common/forms.py:110
msgid "Bind DN" msgid "Bind DN"
msgstr "绑定DN" msgstr "绑定DN"
#: common/forms.py:118 #: common/forms.py:117
msgid "User OU" msgid "User OU"
msgstr "用户OU" msgstr "用户OU"
#: common/forms.py:121 #: common/forms.py:120
msgid "User search filter" msgid "User search filter"
msgstr "用户过滤器" msgstr "用户过滤器"
#: common/forms.py:122 #: common/forms.py:121
#, python-format #, python-format
msgid "Choice may be (cn|uid|sAMAccountName)=%(user)s)" msgid "Choice may be (cn|uid|sAMAccountName)=%(user)s)"
msgstr "可能的选项是(cn或uid或sAMAccountName=%(user)s)" msgstr "可能的选项是(cn或uid或sAMAccountName=%(user)s)"
#: common/forms.py:125 #: common/forms.py:124
msgid "User attr map" msgid "User attr map"
msgstr "LDAP属性映射" msgstr "LDAP属性映射"
#: common/forms.py:132 #: common/forms.py:131
msgid "" msgid ""
"User attr map present how to map LDAP user attr to jumpserver, username,name," "User attr map present how to map LDAP user attr to jumpserver, username,name,"
"email is jumpserver attr" "email is jumpserver attr"
@ -1333,80 +1331,52 @@ msgstr ""
"用户属性映射代表怎样将LDAP中用户属性映射到jumpserver用户上username, name," "用户属性映射代表怎样将LDAP中用户属性映射到jumpserver用户上username, name,"
"email 是jumpserver的属性" "email 是jumpserver的属性"
#: common/forms.py:139 #: common/forms.py:138
msgid "Enable LDAP auth" msgid "Enable LDAP auth"
msgstr "启用LDAP认证" msgstr "启用LDAP认证"
#: common/forms.py:148 #: common/forms.py:147
msgid "List sort by" msgid "List sort by"
msgstr "资产列表排序" msgstr "资产列表排序"
#: common/forms.py:151 #: common/forms.py:150
msgid "Heartbeat interval" msgid "Heartbeat interval"
msgstr "心跳间隔" msgstr "心跳间隔"
#: common/forms.py:151 ops/models/adhoc.py:37 #: common/forms.py:150 ops/models/adhoc.py:37
msgid "Units: seconds" msgid "Units: seconds"
msgstr "单位: 秒" msgstr "单位: 秒"
#: common/forms.py:154 #: common/forms.py:153
msgid "Password auth" msgid "Password auth"
msgstr "密码认证" msgstr "密码认证"
#: common/forms.py:157 #: common/forms.py:156
msgid "Public key auth" msgid "Public key auth"
msgstr "密钥认证" msgstr "密钥认证"
#: common/forms.py:160 common/templates/common/terminal_setting.html:66 #: common/forms.py:159 common/templates/common/terminal_setting.html:63
#: terminal/forms.py:30 terminal/models.py:20 #: terminal/forms.py:30 terminal/models.py:20
msgid "Command storage" msgid "Command storage"
msgstr "命令存储" msgstr "命令存储"
#: common/forms.py:161 #: common/forms.py:160
msgid "" msgid ""
"Set terminal storage setting, `default` is the using as default,You can set " "Set terminal storage setting, `default` is the using as default,You can set "
"other storage and some terminal using" "other storage and some terminal using"
msgstr "设置终端命令存储default是默认用的存储方式" msgstr "设置终端命令存储default是默认用的存储方式"
#: common/forms.py:166 common/templates/common/terminal_setting.html:84 #: common/forms.py:165 common/templates/common/terminal_setting.html:81
#: terminal/forms.py:35 terminal/models.py:21 #: terminal/forms.py:35 terminal/models.py:21
msgid "Replay storage" msgid "Replay storage"
msgstr "录像存储" msgstr "录像存储"
#: common/forms.py:167 #: common/forms.py:166
msgid "" msgid ""
"Set replay storage setting, `default` is the using as default,You can set " "Set replay storage setting, `default` is the using as default,You can set "
"other storage and some terminal using" "other storage and some terminal using"
msgstr "设置终端录像存储default是默认用的存储方式" msgstr "设置终端录像存储default是默认用的存储方式"
#: common/forms.py:175
msgid "Aliyun"
msgstr ""
#: common/forms.py:176
msgid "AWS"
msgstr ""
#: common/forms.py:183
msgid "Cloud provider"
msgstr ""
#: common/forms.py:186
msgid "Access key id"
msgstr ""
#: common/forms.py:187
msgid "Enter the access key id for the cloud service"
msgstr ""
#: common/forms.py:190
msgid "Access key secret"
msgstr ""
#: common/forms.py:191
msgid "Enter the access key secret for the cloud service"
msgstr ""
#: common/mixins.py:29 #: common/mixins.py:29
msgid "is discard" msgid "is discard"
msgstr "" msgstr ""
@ -1420,62 +1390,50 @@ msgid "Enabled"
msgstr "启用" msgstr "启用"
#: common/templates/common/basic_setting.html:15 #: common/templates/common/basic_setting.html:15
#: common/templates/common/cloud_setting.html:16
#: common/templates/common/cloud_setting.html:49
#: common/templates/common/email_setting.html:15 #: common/templates/common/email_setting.html:15
#: common/templates/common/ldap_setting.html:15 #: common/templates/common/ldap_setting.html:15
#: common/templates/common/terminal_setting.html:16 #: common/templates/common/terminal_setting.html:16
#: common/templates/common/terminal_setting.html:45 common/views.py:34 #: common/templates/common/terminal_setting.html:42 common/views.py:22
msgid "Basic setting" msgid "Basic setting"
msgstr "基本设置" msgstr "基本设置"
#: common/templates/common/basic_setting.html:18 #: common/templates/common/basic_setting.html:18
#: common/templates/common/cloud_setting.html:20
#: common/templates/common/email_setting.html:18 #: common/templates/common/email_setting.html:18
#: common/templates/common/ldap_setting.html:18 #: common/templates/common/ldap_setting.html:18
#: common/templates/common/terminal_setting.html:20 common/views.py:60 #: common/templates/common/terminal_setting.html:20 common/views.py:48
msgid "Email setting" msgid "Email setting"
msgstr "邮件设置" msgstr "邮件设置"
#: common/templates/common/basic_setting.html:21 #: common/templates/common/basic_setting.html:21
#: common/templates/common/cloud_setting.html:24
#: common/templates/common/email_setting.html:21 #: common/templates/common/email_setting.html:21
#: common/templates/common/ldap_setting.html:21 #: common/templates/common/ldap_setting.html:21
#: common/templates/common/terminal_setting.html:24 common/views.py:86 #: common/templates/common/terminal_setting.html:24 common/views.py:74
msgid "LDAP setting" msgid "LDAP setting"
msgstr "LDAP设置" msgstr "LDAP设置"
#: common/templates/common/basic_setting.html:24 #: common/templates/common/basic_setting.html:24
#: common/templates/common/cloud_setting.html:28
#: common/templates/common/email_setting.html:24 #: common/templates/common/email_setting.html:24
#: common/templates/common/ldap_setting.html:24 #: common/templates/common/ldap_setting.html:24
#: common/templates/common/terminal_setting.html:28 common/views.py:116 #: common/templates/common/terminal_setting.html:28 common/views.py:104
msgid "Terminal setting" msgid "Terminal setting"
msgstr "终端设置" msgstr "终端设置"
#: common/templates/common/basic_setting.html:27 #: common/templates/common/terminal_setting.html:68
#: common/templates/common/cloud_setting.html:32 #: common/templates/common/terminal_setting.html:86
#: common/templates/common/email_setting.html:27
#: common/templates/common/ldap_setting.html:27
#: common/templates/common/terminal_setting.html:31 common/views.py:144
#, fuzzy
#| msgid "Email setting"
msgid "Cloud setting"
msgstr "邮件设置"
#: common/templates/common/terminal_setting.html:71
#: common/templates/common/terminal_setting.html:89
#: users/templates/users/login_log_list.html:50 #: users/templates/users/login_log_list.html:50
msgid "Type" msgid "Type"
msgstr "类型" msgstr "类型"
#: common/views.py:33 common/views.py:59 common/views.py:85 common/views.py:115 #: common/validators.py:7
#: common/views.py:143 templates/_nav.html:81 msgid "Special char not allowed"
msgstr "不能包含特殊字符"
#: common/views.py:21 common/views.py:47 common/views.py:73 common/views.py:103
#: templates/_nav.html:81
msgid "Settings" msgid "Settings"
msgstr "系统设置" msgstr "系统设置"
#: common/views.py:44 common/views.py:70 common/views.py:98 common/views.py:128 #: common/views.py:32 common/views.py:58 common/views.py:86 common/views.py:116
#: common/views.py:155
msgid "Update setting successfully, please restart program" msgid "Update setting successfully, please restart program"
msgstr "更新设置成功, 请手动重启程序" msgstr "更新设置成功, 请手动重启程序"
@ -1962,7 +1920,7 @@ msgstr "关闭"
#: templates/_nav.html:10 users/views/group.py:28 users/views/group.py:44 #: templates/_nav.html:10 users/views/group.py:28 users/views/group.py:44
#: users/views/group.py:62 users/views/group.py:79 users/views/group.py:95 #: users/views/group.py:62 users/views/group.py:79 users/views/group.py:95
#: users/views/login.py:264 users/views/login.py:325 users/views/user.py:64 #: users/views/login.py:263 users/views/login.py:321 users/views/user.py:64
#: users/views/user.py:79 users/views/user.py:99 users/views/user.py:155 #: users/views/user.py:79 users/views/user.py:99 users/views/user.py:155
#: users/views/user.py:310 users/views/user.py:357 users/views/user.py:379 #: users/views/user.py:310 users/views/user.py:357 users/views/user.py:379
msgid "Users" msgid "Users"
@ -1996,11 +1954,10 @@ msgstr "命令记录"
msgid "Web terminal" msgid "Web terminal"
msgstr "Web终端" msgstr "Web终端"
#: templates/_nav.html:51 terminal/templates/terminal/session_list.html:75 #: templates/_nav.html:51 terminal/views/command.py:47
#: terminal/views/command.py:47 terminal/views/session.py:75 #: terminal/views/session.py:75 terminal/views/session.py:93
#: terminal/views/session.py:93 terminal/views/session.py:115 #: terminal/views/session.py:115 terminal/views/terminal.py:31
#: terminal/views/terminal.py:31 terminal/views/terminal.py:46 #: terminal/views/terminal.py:46 terminal/views/terminal.py:58
#: terminal/views/terminal.py:58
msgid "Terminal" msgid "Terminal"
msgstr "终端管理" msgstr "终端管理"
@ -2079,26 +2036,26 @@ msgstr "线程数"
msgid "Boot Time" msgid "Boot Time"
msgstr "运行时间" msgstr "运行时间"
#: terminal/models.py:128 terminal/templates/terminal/session_list.html:102 #: terminal/models.py:132 terminal/templates/terminal/session_list.html:102
msgid "Replay" msgid "Replay"
msgstr "回放" msgstr "回放"
#: terminal/models.py:129 terminal/templates/terminal/command_list.html:55 #: terminal/models.py:133 terminal/templates/terminal/command_list.html:55
#: terminal/templates/terminal/command_list.html:71 #: terminal/templates/terminal/command_list.html:71
#: terminal/templates/terminal/session_detail.html:48 #: terminal/templates/terminal/session_detail.html:48
#: terminal/templates/terminal/session_list.html:76 #: terminal/templates/terminal/session_list.html:76
msgid "Command" msgid "Command"
msgstr "命令" msgstr "命令"
#: terminal/models.py:131 #: terminal/models.py:136
msgid "Date last active" msgid "Date last active"
msgstr "最后活跃日期" msgstr "最后活跃日期"
#: terminal/models.py:133 #: terminal/models.py:138
msgid "Date end" msgid "Date end"
msgstr "结束日期" msgstr "结束日期"
#: terminal/models.py:150 #: terminal/models.py:155
msgid "Args" msgid "Args"
msgstr "参数" msgstr "参数"
@ -2898,56 +2855,56 @@ msgstr "更新用户组"
msgid "User group granted asset" msgid "User group granted asset"
msgstr "用户组授权资产" msgstr "用户组授权资产"
#: users/views/login.py:60 #: users/views/login.py:59
msgid "Please enable cookies and try again." msgid "Please enable cookies and try again."
msgstr "设置你的浏览器支持cookie" msgstr "设置你的浏览器支持cookie"
#: users/views/login.py:126 users/views/user.py:464 users/views/user.py:489 #: users/views/login.py:125 users/views/user.py:464 users/views/user.py:489
msgid "MFA code invalid" msgid "MFA code invalid"
msgstr "MFA码认证失败" msgstr "MFA码认证失败"
#: users/views/login.py:152 #: users/views/login.py:151
msgid "Logout success" msgid "Logout success"
msgstr "退出登录成功" msgstr "退出登录成功"
#: users/views/login.py:153 #: users/views/login.py:152
msgid "Logout success, return login page" msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面" msgstr "退出登录成功,返回到登录页面"
#: users/views/login.py:169 #: users/views/login.py:168
msgid "Email address invalid, please input again" msgid "Email address invalid, please input again"
msgstr "邮箱地址错误,重新输入" msgstr "邮箱地址错误,重新输入"
#: users/views/login.py:182 #: users/views/login.py:181
msgid "Send reset password message" msgid "Send reset password message"
msgstr "发送重置密码邮件" msgstr "发送重置密码邮件"
#: users/views/login.py:183 #: users/views/login.py:182
msgid "Send reset password mail success, login your mail box and follow it " msgid "Send reset password mail success, login your mail box and follow it "
msgstr "" msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)" "发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
#: users/views/login.py:196 #: users/views/login.py:195
msgid "Reset password success" msgid "Reset password success"
msgstr "重置密码成功" msgstr "重置密码成功"
#: users/views/login.py:197 #: users/views/login.py:196
msgid "Reset password success, return to login page" msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面" msgstr "重置密码成功,返回到登录页面"
#: users/views/login.py:214 users/views/login.py:227 #: users/views/login.py:213 users/views/login.py:226
msgid "Token invalid or expired" msgid "Token invalid or expired"
msgstr "Token错误或失效" msgstr "Token错误或失效"
#: users/views/login.py:223 #: users/views/login.py:222
msgid "Password not same" msgid "Password not same"
msgstr "密码不一致" msgstr "密码不一致"
#: users/views/login.py:264 #: users/views/login.py:263
msgid "First login" msgid "First login"
msgstr "首次登陆" msgstr "首次登陆"
#: users/views/login.py:326 #: users/views/login.py:322
msgid "Login log list" msgid "Login log list"
msgstr "登录日志" msgstr "登录日志"
@ -2995,8 +2952,4 @@ msgstr "MFA 解绑成功"
msgid "MFA disable success, return login page" msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面" msgstr "MFA 解绑成功,返回登录页面"
#~ msgid "Step"
#~ msgstr "Step"
#~ msgid "Add asset"
#~ msgstr "添加资产到节点"