Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
0f399636
Commit
0f399636
authored
May 27, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:jumpserver/jumpserver into dev
parents
0847539e
f576f2ed
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
274 additions
and
142 deletions
+274
-142
settings.py
apps/jumpserver/settings.py
+1
-1
django.mo
apps/locale/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/locale/zh/LC_MESSAGES/django.po
+173
-125
api.py
apps/settings/api.py
+2
-4
security_setting.html
apps/settings/templates/settings/security_setting.html
+2
-2
forms.py
apps/users/forms.py
+10
-0
_user.html
apps/users/templates/users/_user.html
+3
-0
user_create.html
apps/users/templates/users/user_create.html
+75
-7
user.py
apps/users/views/user.py
+8
-3
No files found.
apps/jumpserver/settings.py
View file @
0f399636
...
...
@@ -378,8 +378,8 @@ REST_FRAMEWORK = {
'rest_framework.parsers.JSONParser'
,
'rest_framework.parsers.FormParser'
,
'rest_framework.parsers.MultiPartParser'
,
'common.parsers.JMSCSVParser'
,
'rest_framework.parsers.FileUploadParser'
,
'common.parsers.JMSCSVParser'
),
'DEFAULT_AUTHENTICATION_CLASSES'
:
(
# 'rest_framework.authentication.BasicAuthentication',
...
...
apps/locale/zh/LC_MESSAGES/django.mo
View file @
0f399636
No preview for this file type
apps/locale/zh/LC_MESSAGES/django.po
View file @
0f399636
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-24 1
2:02
+0800\n"
"POT-Creation-Date: 2019-05-24 1
9:17
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -101,7 +101,7 @@ msgstr "运行参数"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_subtask_list.html:13
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:14
#: xpack/plugins/cloud/models.py:187
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
5
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
3
#: xpack/plugins/orgs/templates/orgs/org_list.html:16
msgid "Asset"
msgstr "资产"
...
...
@@ -177,9 +177,9 @@ msgstr "系统用户"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:61
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:12
#: xpack/plugins/cloud/models.py:49 xpack/plugins/cloud/models.py:119
#: xpack/plugins/cloud/templates/cloud/account_detail.html:5
2
#: xpack/plugins/cloud/templates/cloud/account_detail.html:5
0
#: xpack/plugins/cloud/templates/cloud/account_list.html:12
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:5
5
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:5
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:12
#: xpack/plugins/orgs/templates/orgs/org_detail.html:52
#: xpack/plugins/orgs/templates/orgs/org_list.html:12
...
...
@@ -244,8 +244,8 @@ msgstr "创建者"
#: users/templates/users/user_group_detail.html:63
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:105
#: xpack/plugins/cloud/models.py:56 xpack/plugins/cloud/models.py:128
#: xpack/plugins/cloud/templates/cloud/account_detail.html:6
8
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:7
9
#: xpack/plugins/cloud/templates/cloud/account_detail.html:6
6
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:7
7
#: xpack/plugins/orgs/templates/orgs/org_detail.html:60
msgid "Date created"
msgstr "创建日期"
...
...
@@ -286,9 +286,9 @@ msgstr "创建日期"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:117
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:19
#: xpack/plugins/cloud/models.py:54 xpack/plugins/cloud/models.py:125
#: xpack/plugins/cloud/templates/cloud/account_detail.html:7
2
#: xpack/plugins/cloud/templates/cloud/account_detail.html:7
0
#: xpack/plugins/cloud/templates/cloud/account_list.html:15
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:
71
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:
69
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:16
#: xpack/plugins/orgs/templates/orgs/org_detail.html:64
#: xpack/plugins/orgs/templates/orgs/org_list.html:22
...
...
@@ -443,11 +443,11 @@ msgstr "详情"
#: users/templates/users/user_profile.html:187
#: users/templates/users/user_profile.html:196
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:29
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
4
#: xpack/plugins/cloud/templates/cloud/account_detail.html:2
5
#: xpack/plugins/cloud/templates/cloud/account_list.html:3
8
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
5
#: xpack/plugins/cloud/templates/cloud/account_detail.html:2
3
#: xpack/plugins/cloud/templates/cloud/account_list.html:3
9
#: xpack/plugins/orgs/templates/orgs/org_detail.html:25
#: xpack/plugins/orgs/templates/orgs/org_list.html:8
5
#: xpack/plugins/orgs/templates/orgs/org_list.html:8
7
msgid "Update"
msgstr "更新"
...
...
@@ -481,13 +481,13 @@ msgstr "更新"
#: users/templates/users/user_list.html:104
#: users/templates/users/user_list.html:108
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:33
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
6
#: xpack/plugins/cloud/templates/cloud/account_detail.html:2
9
#: xpack/plugins/cloud/templates/cloud/account_list.html:4
0
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:3
2
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:5
4
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
7
#: xpack/plugins/cloud/templates/cloud/account_detail.html:2
7
#: xpack/plugins/cloud/templates/cloud/account_list.html:4
1
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:3
0
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:5
5
#: xpack/plugins/orgs/templates/orgs/org_detail.html:29
#: xpack/plugins/orgs/templates/orgs/org_list.html:8
7
#: xpack/plugins/orgs/templates/orgs/org_list.html:8
9
msgid "Delete"
msgstr "删除"
...
...
@@ -624,7 +624,7 @@ msgstr "节点管理"
#: assets/models/cluster.py:19 assets/models/user.py:91
#: assets/templates/assets/asset_detail.html:80 templates/_nav.html:24
#: xpack/plugins/cloud/models.py:124
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:6
7
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:6
5
#: xpack/plugins/orgs/templates/orgs/org_list.html:18
msgid "Admin user"
msgstr "管理用户"
...
...
@@ -661,8 +661,8 @@ msgstr "网域"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:55
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:15
#: xpack/plugins/cloud/models.py:123
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:6
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
6
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:6
1
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
4
msgid "Node"
msgstr "节点"
...
...
@@ -742,9 +742,8 @@ msgstr "密码或密钥密码"
#: authentication/forms.py:13
#: authentication/templates/authentication/login.html:67
#: authentication/templates/authentication/new_login.html:93
#: settings/forms.py:103 users/forms.py:15 users/forms.py:
27
#: settings/forms.py:103 users/forms.py:15 users/forms.py:
33
#: users/templates/users/reset_password.html:53
#: users/templates/users/user_create.html:10
#: users/templates/users/user_password_authentication.html:18
#: users/templates/users/user_password_update.html:43
#: users/templates/users/user_profile_update.html:40
...
...
@@ -1138,10 +1137,10 @@ msgstr "默认资产组"
#: terminal/models.py:154 terminal/templates/terminal/command_list.html:32
#: terminal/templates/terminal/command_list.html:72
#: terminal/templates/terminal/session_list.html:33
#: terminal/templates/terminal/session_list.html:71 users/forms.py:2
8
3
#: terminal/templates/terminal/session_list.html:71 users/forms.py:2
9
3
#: users/models/user.py:36 users/models/user.py:467 users/serializers/v1.py:61
#: users/templates/users/user_group_detail.html:78
#: users/templates/users/user_group_list.html:36 users/views/user.py:39
4
#: users/templates/users/user_group_list.html:36 users/views/user.py:39
9
#: xpack/plugins/orgs/forms.py:26
#: xpack/plugins/orgs/templates/orgs/org_detail.html:113
#: xpack/plugins/orgs/templates/orgs/org_list.html:14
...
...
@@ -1216,7 +1215,7 @@ msgstr "连接"
msgid "Org name"
msgstr "组织名"
#: assets/serializers/asset_user.py:23 users/forms.py:2
3
0
#: assets/serializers/asset_user.py:23 users/forms.py:2
4
0
#: users/models/user.py:91 users/templates/users/first_login.html:42
#: users/templates/users/user_password_update.html:46
#: users/templates/users/user_profile.html:68
...
...
@@ -1371,7 +1370,7 @@ msgstr "资产用户信息"
#: assets/templates/assets/_asset_user_view_auth_modal.html:14
#: audits/models.py:99 audits/templates/audits/login_log_list.html:56
#: users/forms.py:1
4
2 users/models/user.py:83
#: users/forms.py:1
5
2 users/models/user.py:83
#: users/templates/users/first_login.html:45
msgid "MFA"
msgstr "MFA"
...
...
@@ -2233,7 +2232,7 @@ msgstr "原因"
#: audits/models.py:101 audits/templates/audits/login_log_list.html:58
#: xpack/plugins/cloud/models.py:171 xpack/plugins/cloud/models.py:188
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:70
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
7
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
5
msgid "Status"
msgstr "状态"
...
...
@@ -2273,7 +2272,7 @@ msgstr "选择用户"
#: terminal/templates/terminal/command_list.html:60
#: terminal/templates/terminal/session_list.html:61
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:52
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:
50
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:
48
msgid "Search"
msgstr "搜索"
...
...
@@ -2283,7 +2282,7 @@ msgstr "搜索"
#: ops/templates/ops/task_detail.html:56
#: terminal/templates/terminal/session_list.html:70
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:64
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
2
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
0
msgid "ID"
msgstr "ID"
...
...
@@ -2544,8 +2543,8 @@ msgstr "欢迎回来,请输入用户名和密码登录"
msgid "Please enable cookies and try again."
msgstr "设置你的浏览器支持cookie"
#: authentication/views/login.py:172 users/views/user.py:54
0
#: users/views/user.py:5
65
#: authentication/views/login.py:172 users/views/user.py:54
5
#: users/views/user.py:5
70
msgid "MFA code invalid, or ntp sync server time"
msgstr "MFA验证码不正确,或者服务器端时间不对"
...
...
@@ -2685,7 +2684,7 @@ msgid "Become"
msgstr "Become"
#: ops/models/adhoc.py:166 users/templates/users/user_group_detail.html:59
#: xpack/plugins/cloud/templates/cloud/account_detail.html:6
4
#: xpack/plugins/cloud/templates/cloud/account_detail.html:6
2
#: xpack/plugins/orgs/templates/orgs/org_detail.html:56
msgid "Create by"
msgstr "创建者"
...
...
@@ -2931,8 +2930,8 @@ msgstr "版本"
#: ops/templates/ops/task_list.html:63
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:137
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
2
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:5
2
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:5
3
msgid "Run"
msgstr "执行"
...
...
@@ -2988,7 +2987,7 @@ msgstr "下载文件"
#: perms/templates/perms/asset_permission_list.html:75
#: perms/templates/perms/asset_permission_list.html:122
#: perms/templates/perms/remote_app_permission_list.html:16
#: templates/_nav.html:14 users/forms.py:2
5
3 users/models/group.py:26
#: templates/_nav.html:14 users/forms.py:2
6
3 users/models/group.py:26
#: users/models/user.py:67 users/templates/users/_select_user_modal.html:16
#: users/templates/users/user_detail.html:213
#: users/templates/users/user_list.html:38
...
...
@@ -3117,7 +3116,7 @@ msgstr "创建授权规则"
#: perms/templates/perms/asset_permission_list.html:73
#: perms/templates/perms/remote_app_permission_list.html:18
#: users/templates/users/user_list.html:40 xpack/plugins/cloud/models.py:53
#: xpack/plugins/cloud/templates/cloud/account_detail.html:
60
#: xpack/plugins/cloud/templates/cloud/account_detail.html:
58
#: xpack/plugins/cloud/templates/cloud/account_list.html:14
msgid "Validity"
msgstr "有效"
...
...
@@ -3685,8 +3684,8 @@ msgstr "端点后缀"
#: settings/templates/settings/replay_storage_create.html:136
#: xpack/plugins/cloud/models.py:186
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:8
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
4
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:8
1
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
2
msgid "Region"
msgstr "地域"
...
...
@@ -3732,18 +3731,14 @@ msgstr "删除失败"
msgid "Are you sure about deleting it?"
msgstr "您确定删除吗?"
#: settings/utils.py:
71
msgid "
User does not exist
"
msgstr "
用户不存在
"
#: settings/utils.py:
85
msgid "
Search no entry matched in ou {}
"
msgstr "
在ou:{}中没有匹配条目
"
#: settings/utils.py:
74
#: settings/utils.py:
113
msgid "The user source is not LDAP"
msgstr "用户来源不是LDAP"
#: settings/utils.py:155
msgid "Search no entry matched in ou {}"
msgstr "在ou:{}中没有匹配条目"
#: settings/views.py:18 settings/views.py:44 settings/views.py:70
#: settings/views.py:99 settings/views.py:126 settings/views.py:138
#: settings/views.py:151 settings/views.py:177 templates/_nav.html:118
...
...
@@ -3775,14 +3770,14 @@ msgstr "文档"
msgid "Commercial support"
msgstr "商业支持"
#: templates/_header_bar.html:89 templates/_nav_user.html:26 users/forms.py:1
2
1
#: templates/_header_bar.html:89 templates/_nav_user.html:26 users/forms.py:1
3
1
#: users/templates/users/_user.html:43
#: users/templates/users/first_login.html:39
#: users/templates/users/user_password_update.html:40
#: users/templates/users/user_profile.html:17
#: users/templates/users/user_profile_update.html:37
#: users/templates/users/user_profile_update.html:57
#: users/templates/users/user_pubkey_update.html:37 users/views/user.py:3
76
#: users/templates/users/user_pubkey_update.html:37 users/views/user.py:3
81
msgid "Profile"
msgstr "个人信息"
...
...
@@ -3876,9 +3871,9 @@ msgstr ""
#: templates/_nav.html:10 users/views/group.py:27 users/views/group.py:43
#: users/views/group.py:59 users/views/group.py:75 users/views/group.py:91
#: users/views/login.py:154 users/views/user.py:70 users/views/user.py:8
5
#: users/views/user.py:12
4 users/views/user.py:202 users/views/user.py:363
#: users/views/user.py:41
3 users/views/user.py:453
#: users/views/login.py:154 users/views/user.py:70 users/views/user.py:8
6
#: users/views/user.py:12
9 users/views/user.py:207 users/views/user.py:368
#: users/views/user.py:41
8 users/views/user.py:458
msgid "Users"
msgstr "用户管理"
...
...
@@ -3919,7 +3914,7 @@ msgid "File manager"
msgstr "文件管理"
#: templates/_nav.html:68 terminal/views/command.py:50
#: terminal/views/session.py:7
5 terminal/views/session.py:93
#: terminal/views/session.py:7
4 terminal/views/session.py:92
#: terminal/views/session.py:115 terminal/views/terminal.py:31
#: terminal/views/terminal.py:46 terminal/views/terminal.py:58
msgid "Terminal"
...
...
@@ -4299,11 +4294,11 @@ msgstr "接受终端注册"
msgid "Info"
msgstr "信息"
#: terminal/views/session.py:7
6
#: terminal/views/session.py:7
5
msgid "Session online list"
msgstr "在线会话"
#: terminal/views/session.py:9
4
#: terminal/views/session.py:9
3
msgid "Session offline list"
msgstr "离线会话"
...
...
@@ -4336,7 +4331,15 @@ msgstr "你没有权限"
msgid "Could not reset self otp, use profile reset instead"
msgstr "不能再该页面重置MFA, 请去个人信息页面重置"
#: users/forms.py:32 users/models/user.py:71
#: users/forms.py:25
msgid "Reset link will be generated and sent to the user"
msgstr "生成重置密码链接,通过邮件发送给用户"
#: users/forms.py:26
msgid "Set password"
msgstr "设置密码"
#: users/forms.py:38 users/models/user.py:71
#: users/templates/users/_select_user_modal.html:15
#: users/templates/users/user_detail.html:87
#: users/templates/users/user_list.html:37
...
...
@@ -4344,31 +4347,39 @@ msgstr "不能再该页面重置MFA, 请去个人信息页面重置"
msgid "Role"
msgstr "角色"
#: users/forms.py:
35 users/forms.py:20
0
#: users/forms.py:
41 users/forms.py:21
0
msgid "ssh public key"
msgstr "ssh公钥"
#: users/forms.py:
36 users/forms.py:20
1
#: users/forms.py:
42 users/forms.py:21
1
msgid "ssh-rsa AAAA..."
msgstr ""
#: users/forms.py:
37
#: users/forms.py:
43
msgid "Paste user id_rsa.pub here."
msgstr "复制用户公钥到这里"
#: users/forms.py:51 users/templates/users/user_detail.html:221
#: users/forms.py:47 xpack/plugins/change_auth_plan/models.py:83
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:51
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:69
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:57
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:16
msgid "Password strategy"
msgstr "密码策略"
#: users/forms.py:61 users/templates/users/user_detail.html:221
msgid "Join user groups"
msgstr "添加到用户组"
#: users/forms.py:
85 users/forms.py:21
5
#: users/forms.py:
95 users/forms.py:22
5
msgid "Public key should not be the same as your old one."
msgstr "不能和原来的密钥相同"
#: users/forms.py:
89 users/forms.py:21
9 users/serializers/v1.py:47
#: users/forms.py:
99 users/forms.py:22
9 users/serializers/v1.py:47
msgid "Not a valid ssh public key"
msgstr "ssh密钥不合法"
#: users/forms.py:1
2
7
#: users/forms.py:1
3
7
msgid ""
"Tip: when enabled, you will enter the MFA binding process the next time you "
"log in. you can also directly bind in \"personal information -> quick "
...
...
@@ -4377,11 +4388,11 @@ msgstr ""
"提示:启用之后您将会在下次登录时进入MFA绑定流程;您也可以在(个人信息->快速修"
"改->更改MFA设置)中直接绑定!"
#: users/forms.py:1
3
7
#: users/forms.py:1
4
7
msgid "* Enable MFA authentication to make the account more secure."
msgstr "* 启用MFA认证,使账号更加安全."
#: users/forms.py:1
4
7
#: users/forms.py:1
5
7
msgid ""
"In order to protect you and your company, please keep your account, password "
"and key sensitive information properly. (for example: setting complex "
...
...
@@ -4390,41 +4401,41 @@ msgstr ""
"为了保护您和公司的安全,请妥善保管您的账户、密码和密钥等重要敏感信息;(如:"
"设置复杂密码,启用MFA认证)"
#: users/forms.py:1
5
4 users/templates/users/first_login.html:48
#: users/forms.py:1
6
4 users/templates/users/first_login.html:48
#: users/templates/users/first_login.html:107
#: users/templates/users/first_login.html:130
msgid "Finish"
msgstr "完成"
#: users/forms.py:1
6
0
#: users/forms.py:1
7
0
msgid "Old password"
msgstr "原来密码"
#: users/forms.py:1
6
5
#: users/forms.py:1
7
5
msgid "New password"
msgstr "新密码"
#: users/forms.py:1
7
0
#: users/forms.py:1
8
0
msgid "Confirm password"
msgstr "确认密码"
#: users/forms.py:1
8
0
#: users/forms.py:1
9
0
msgid "Old password error"
msgstr "原来密码错误"
#: users/forms.py:1
8
8
#: users/forms.py:1
9
8
msgid "Password does not match"
msgstr "密码不一致"
#: users/forms.py:
19
8
#: users/forms.py:
20
8
msgid "Automatically configure and download the SSH key"
msgstr "自动配置并下载SSH密钥"
#: users/forms.py:2
0
2
#: users/forms.py:2
1
2
msgid "Paste your id_rsa.pub here."
msgstr "复制你的公钥到这里"
#: users/forms.py:2
36 users/forms.py:241 users/forms.py:28
7
#: users/forms.py:2
46 users/forms.py:251 users/forms.py:29
7
#: xpack/plugins/orgs/forms.py:30
msgid "Select users"
msgstr "选择用户"
...
...
@@ -4471,7 +4482,7 @@ msgid "Date password last updated"
msgstr "最后更新密码日期"
#: users/models/user.py:136 users/templates/users/user_update.html:22
#: users/views/login.py:47 users/views/login.py:108 users/views/user.py:4
26
#: users/views/login.py:47 users/views/login.py:108 users/views/user.py:4
31
msgid "User auth from {}, go there change password"
msgstr "用户认证源来自 {}, 请去相应系统修改密码"
...
...
@@ -4522,7 +4533,7 @@ msgstr "安全令牌验证"
#: users/templates/users/_base_otp.html:44 users/templates/users/_user.html:13
#: users/templates/users/user_profile_update.html:51
#: xpack/plugins/cloud/models.py:120
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:5
9
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:5
7
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:13
msgid "Account"
msgstr "账户"
...
...
@@ -4557,7 +4568,7 @@ msgid "Import users"
msgstr "导入用户"
#: users/templates/users/_user_update_modal.html:4
#: users/templates/users/user_update.html:4 users/views/user.py:1
25
#: users/templates/users/user_update.html:4 users/views/user.py:1
30
msgid "Update user"
msgstr "更新用户"
...
...
@@ -4635,12 +4646,14 @@ msgid "Reset password"
msgstr "重置密码"
#: users/templates/users/reset_password.html:59
#: users/templates/users/user_create.html:15
#: users/templates/users/user_password_update.html:61
#: users/templates/users/user_update.html:13
msgid "Your password must satisfy"
msgstr "您的密码必须满足:"
#: users/templates/users/reset_password.html:60
#: users/templates/users/user_create.html:16
#: users/templates/users/user_password_update.html:62
#: users/templates/users/user_update.html:14
msgid "Password strength"
...
...
@@ -4651,52 +4664,54 @@ msgid "Password again"
msgstr "再次输入密码"
#: users/templates/users/reset_password.html:105
#: users/templates/users/user_create.html:35
#: users/templates/users/user_password_update.html:99
#: users/templates/users/user_update.html:46
msgid "Very weak"
msgstr "很弱"
#: users/templates/users/reset_password.html:106
#: users/templates/users/user_create.html:36
#: users/templates/users/user_password_update.html:100
#: users/templates/users/user_update.html:47
msgid "Weak"
msgstr "弱"
#: users/templates/users/reset_password.html:107
#: users/templates/users/user_create.html:37
#: users/templates/users/user_password_update.html:101
#: users/templates/users/user_update.html:48
msgid "Normal"
msgstr "正常"
#: users/templates/users/reset_password.html:108
#: users/templates/users/user_create.html:38
#: users/templates/users/user_password_update.html:102
#: users/templates/users/user_update.html:49
msgid "Medium"
msgstr "一般"
#: users/templates/users/reset_password.html:109
#: users/templates/users/user_create.html:39
#: users/templates/users/user_password_update.html:103
#: users/templates/users/user_update.html:50
msgid "Strong"
msgstr "强"
#: users/templates/users/reset_password.html:110
#: users/templates/users/user_create.html:40
#: users/templates/users/user_password_update.html:104
#: users/templates/users/user_update.html:51
msgid "Very strong"
msgstr "很强"
#: users/templates/users/user_create.html:4
#: users/templates/users/user_list.html:28 users/views/user.py:8
5
#: users/templates/users/user_list.html:28 users/views/user.py:8
7
msgid "Create user"
msgstr "创建用户"
#: users/templates/users/user_create.html:12
msgid "Reset link will be generated and sent to the user. "
msgstr "生成重置密码连接,通过邮件发送给用户"
#: users/templates/users/user_detail.html:19
#: users/templates/users/user_granted_asset.html:18 users/views/user.py:20
3
#: users/templates/users/user_granted_asset.html:18 users/views/user.py:20
8
msgid "User detail"
msgstr "用户详情"
...
...
@@ -4899,8 +4914,8 @@ msgstr "安装完成后点击下一步进入绑定页面(如已安装,直接
msgid "Administrator Settings force MFA login"
msgstr "管理员设置强制使用MFA登录"
#: users/templates/users/user_profile.html:120 users/views/user.py:2
39
#: users/views/user.py:29
3
#: users/templates/users/user_profile.html:120 users/views/user.py:2
44
#: users/views/user.py:29
8
msgid "User groups"
msgstr "用户组"
...
...
@@ -5179,7 +5194,7 @@ msgstr "Token错误或失效"
msgid "Password not same"
msgstr "密码不一致"
#: users/views/login.py:115 users/views/user.py:1
39 users/views/user.py:436
#: users/views/login.py:115 users/views/user.py:1
44 users/views/user.py:441
msgid "* Your password does not meet the requirements"
msgstr "* 您的密码不符合要求"
...
...
@@ -5187,51 +5202,51 @@ msgstr "* 您的密码不符合要求"
msgid "First login"
msgstr "首次登录"
#: users/views/user.py:1
56
#: users/views/user.py:1
61
msgid "Bulk update user success"
msgstr "批量更新用户成功"
#: users/views/user.py:18
3
#: users/views/user.py:18
8
msgid "Bulk update user"
msgstr "批量更新用户"
#: users/views/user.py:2
68
#: users/views/user.py:2
73
msgid "Invalid file."
msgstr "文件不合法"
#: users/views/user.py:36
4
#: users/views/user.py:36
9
msgid "User granted assets"
msgstr "用户授权资产"
#: users/views/user.py:
395
#: users/views/user.py:
400
msgid "Profile setting"
msgstr "个人信息设置"
#: users/views/user.py:41
4
#: users/views/user.py:41
9
msgid "Password update"
msgstr "密码更新"
#: users/views/user.py:45
4
#: users/views/user.py:45
9
msgid "Public key update"
msgstr "密钥更新"
#: users/views/user.py:
495
#: users/views/user.py:
500
msgid "Password invalid"
msgstr "用户名或密码无效"
#: users/views/user.py:
595
#: users/views/user.py:
600
msgid "MFA enable success"
msgstr "MFA 绑定成功"
#: users/views/user.py:
596
#: users/views/user.py:
601
msgid "MFA enable success, return login page"
msgstr "MFA 绑定成功,返回到登录页面"
#: users/views/user.py:
598
#: users/views/user.py:
603
msgid "MFA disable success"
msgstr "MFA 解绑成功"
#: users/views/user.py:
599
#: users/views/user.py:
604
msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面"
...
...
@@ -5324,14 +5339,6 @@ msgstr "周期执行"
msgid "Regularly perform"
msgstr "定期执行"
#: xpack/plugins/change_auth_plan/models.py:83
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:51
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:69
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:57
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:16
msgid "Password strategy"
msgstr "密码策略"
#: xpack/plugins/change_auth_plan/models.py:87
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:74
msgid "Password rules"
...
...
@@ -5404,7 +5411,7 @@ msgid "Run plan manually"
msgstr "手动执行计划"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:179
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:10
1
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:10
2
msgid "Execute failed"
msgstr "执行失败"
...
...
@@ -5490,7 +5497,7 @@ msgid "Unavailable"
msgstr "无效"
#: xpack/plugins/cloud/models.py:50
#: xpack/plugins/cloud/templates/cloud/account_detail.html:5
6
#: xpack/plugins/cloud/templates/cloud/account_detail.html:5
4
#: xpack/plugins/cloud/templates/cloud/account_list.html:13
msgid "Provider"
msgstr "云服务商"
...
...
@@ -5516,7 +5523,7 @@ msgid "Instances"
msgstr "实例"
#: xpack/plugins/cloud/models.py:126
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:7
5
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:7
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:17
msgid "Date last sync"
msgstr "最后同步日期"
...
...
@@ -5535,7 +5542,7 @@ msgstr ""
#: xpack/plugins/cloud/models.py:173 xpack/plugins/cloud/models.py:189
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:71
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
8
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
6
msgid "Date sync"
msgstr "同步日期"
...
...
@@ -5552,8 +5559,8 @@ msgid "Sync instance task history"
msgstr "同步实例任务历史"
#: xpack/plugins/cloud/models.py:185
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:
91
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:
89
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:6
1
msgid "Instance"
msgstr "实例"
...
...
@@ -5573,7 +5580,7 @@ msgstr "AWS (国际)"
msgid "Qcloud"
msgstr "腾讯云"
#: xpack/plugins/cloud/templates/cloud/account_detail.html:2
2
#: xpack/plugins/cloud/templates/cloud/account_detail.html:2
0
#: xpack/plugins/cloud/views.py:72
msgid "Account detail"
msgstr "账户详情"
...
...
@@ -5591,23 +5598,23 @@ msgstr "加载中..."
msgid "Load failed"
msgstr "加载失败"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:2
2
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:2
0
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:25
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:2
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:2
1
#: xpack/plugins/cloud/views.py:122
msgid "Sync task detail"
msgstr "同步任务详情"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:2
5
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:2
3
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:28
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:2
6
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:2
4
#: xpack/plugins/cloud/views.py:137
msgid "Sync task history"
msgstr "同步历史列表"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:2
8
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:2
6
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:31
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:2
9
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:2
7
#: xpack/plugins/cloud/views.py:188
msgid "Sync instance list"
msgstr "同步实例列表"
...
...
@@ -5640,7 +5647,7 @@ msgstr "执行次数"
msgid "Instance count"
msgstr "实例个数"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:9
2
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:9
3
msgid "Sync success"
msgstr "同步成功"
...
...
@@ -5724,6 +5731,7 @@ msgid "This will restore default Settings of the interface !!!"
msgstr "您确定要恢复默认初始化吗?"
#: xpack/plugins/interface/templates/interface/interface.html:107
#: xpack/plugins/interface/views.py:53
msgid "Restore default successfully."
msgstr "恢复默认成功!"
...
...
@@ -5736,13 +5744,9 @@ msgid "Interface"
msgstr "界面"
#: xpack/plugins/interface/views.py:49
msgid "It is already in the default setting state
!
"
msgid "It is already in the default setting state
!
"
msgstr "当前已经是初始化状态!"
#: xpack/plugins/interface/views.py:53
msgid "Restore default successfully!"
msgstr "恢复默认成功!"
#: xpack/plugins/license/meta.py:11 xpack/plugins/license/models.py:94
#: xpack/plugins/license/templates/license/license_detail.html:50
#: xpack/plugins/license/templates/license/license_detail.html:55
...
...
@@ -5880,6 +5884,50 @@ msgstr "创建组织"
msgid "Update org"
msgstr "更新组织"
#~ msgid "User does not exist"
#~ msgstr "用户不存在"
#~ msgid "Restore default successfully!"
#~ msgstr "恢复默认成功!"
#~ msgid "The initial password has been cleared."
#~ msgstr "当前初始密码已经清除."
#~ msgid "Clear initial password successfully."
#~ msgstr "清除初始密码成功."
#~ msgid "User Initial Password"
#~ msgstr "用户初始密码"
#~ msgid "Clear initial password"
#~ msgstr "清除初始密码"
#~ msgid "This will be clear the initial password !!!"
#~ msgstr "这将会清除用户初始密码!!!"
#~ msgid "Clear Initial Password"
#~ msgstr "清除初始密码"
#~ msgid "Clear initial password failed."
#~ msgstr "清除初始密码失败."
#~ msgid "INITIAL_PASSWORD"
#~ msgstr "初始化密码"
#~ msgid "CUSTOM_PASSWORD"
#~ msgstr "自定义密码"
#~ msgid "EMAIL_SET_PASSWORD"
#~ msgstr "邮件设置密码"
#~ msgid ""
#~ "This will use the default initial password by the system. Please go to "
#~ "the system Settings application to set the initial password"
#~ msgstr "这将会使用系统设置的初始密码. 请先到系统设置应用里去设置初始密码."
#~ msgid "The password cannot be the same as the initial password"
#~ msgstr "密码设置不能和系统设置的初始密码一致"
#~ msgid "Update user groups"
#~ msgstr "更新用户组"
...
...
apps/settings/api.py
View file @
0f399636
...
...
@@ -220,7 +220,4 @@ class DjangoSettingsAPI(APIView):
data
[
k
]
=
v
except
(
json
.
JSONDecodeError
,
TypeError
):
data
[
k
]
=
str
(
v
)
return
Response
(
data
)
return
Response
(
data
)
\ No newline at end of file
apps/settings/templates/settings/security_setting.html
View file @
0f399636
...
...
@@ -33,8 +33,8 @@
</div>
<div
class=
"tab-content"
>
<div
class=
"col-sm-12"
style=
"padding-left:0"
>
<div
class=
"ibox-content"
style=
"border-width: 0;padding-top: 40px;"
>
<form
action=
""
method=
"post"
class=
"form-horizontal"
>
<div
class=
"ibox-content"
style=
"border-width: 0;padding-top: 40px;"
>
<form
action=
""
method=
"post"
class=
"form-horizontal"
>
{% if form.non_field_errors %}
<div
class=
"alert alert-danger"
>
{{ form.non_field_errors }}
...
...
apps/users/forms.py
View file @
0f399636
...
...
@@ -22,6 +22,12 @@ class UserCheckOtpCodeForm(forms.Form):
class
UserCreateUpdateForm
(
OrgModelForm
):
EMAIL_SET_PASSWORD
=
_
(
'Reset link will be generated and sent to the user'
)
CUSTOM_PASSWORD
=
_
(
'Set password'
)
PASSWORD_STRATEGY_CHOICES
=
(
(
0
,
EMAIL_SET_PASSWORD
),
(
1
,
CUSTOM_PASSWORD
)
)
role_choices
=
((
i
,
n
)
for
i
,
n
in
User
.
ROLE_CHOICES
if
i
!=
User
.
ROLE_APP
)
password
=
forms
.
CharField
(
label
=
_
(
'Password'
),
widget
=
forms
.
PasswordInput
,
...
...
@@ -36,6 +42,10 @@ class UserCreateUpdateForm(OrgModelForm):
widget
=
forms
.
Textarea
(
attrs
=
{
'placeholder'
:
_
(
'ssh-rsa AAAA...'
)}),
help_text
=
_
(
'Paste user id_rsa.pub here.'
)
)
password_strategy
=
forms
.
ChoiceField
(
choices
=
PASSWORD_STRATEGY_CHOICES
,
required
=
True
,
initial
=
0
,
widget
=
forms
.
RadioSelect
(),
label
=
_
(
'Password strategy'
)
)
class
Meta
:
model
=
User
...
...
apps/users/templates/users/_user.html
View file @
0f399636
...
...
@@ -74,6 +74,9 @@
$
(
document
).
ready
(
function
()
{
$
(
'.select2'
).
select2
();
$
(
'#id_date_expired'
).
daterangepicker
(
dateOptions
);
var
mfa_radio
=
$
(
'#id_otp_level'
);
mfa_radio
.
addClass
(
"form-inline"
);
mfa_radio
.
children
().
css
(
"margin-right"
,
"15px"
)
})
</script>
{% endblock %}
apps/users/templates/users/user_create.html
View file @
0f399636
...
...
@@ -2,15 +2,83 @@
{% load i18n %}
{% load bootstrap3 %}
{% block user_template_title %}{% trans "Create user" %}{% endblock %}
{#{% block username %}#}
{# {% bootstrap_field form.username layout="horizontal" %}#}
{#{% endblock %}#}
{% block password %}
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
{% trans 'Password' %}
</label>
<div
class=
"col-sm-8 controls"
style=
"margin-top: 8px;"
>
{% trans 'Reset link will be generated and sent to the user. ' %}
{% bootstrap_field form.password_strategy layout="horizontal" %}
<div
class=
"form-group"
id=
"custom_password"
>
{% bootstrap_field form.password layout="horizontal" %}
</div>
{# 密码popover #}
<div
id=
"container"
>
<div
class=
"popover fade bottom in"
role=
"tooltip"
id=
"popover777"
style=
" display: none; width:260px;"
>
<div
class=
"arrow"
style=
"left: 50%;"
></div>
<h3
class=
"popover-title"
style=
"display: none;"
></h3>
<h4>
{% trans 'Your password must satisfy' %}
</h4><div
id=
"id_password_rules"
style=
"color: #908a8a; margin-left:20px; font-size:15px;"
></div>
<h4
style=
"margin-top: 10px;"
>
{% trans 'Password strength' %}
</h4><div
id=
"id_progress"
></div>
<div
class=
"popover-content"
></div>
</div>
</div>
<script>
function
passwordCheck
()
{
if
(
$
(
'#id_password'
).
length
!=
1
)
{
return
}
var
el
=
$
(
'#id_password_rules'
),
idPassword
=
$
(
'#id_password'
),
idPopover
=
$
(
'#popover777'
),
container
=
$
(
'#container'
),
progress
=
$
(
'#id_progress'
),
password_check_rules
=
{{
password_check_rules
|
safe
}},
minLength
=
6
,
top
=
idPassword
.
offset
().
top
-
$
(
'.navbar'
).
outerHeight
(
true
)
-
$
(
'.page-heading'
).
outerHeight
(
true
)
-
10
+
34
,
left
=
377
,
i18n_fallback
=
{
"veryWeak"
:
"{% trans 'Very weak' %}"
,
"weak"
:
"{% trans 'Weak' %}"
,
"normal"
:
"{% trans 'Normal' %}"
,
"medium"
:
"{% trans 'Medium' %}"
,
"strong"
:
"{% trans 'Strong' %}"
,
"veryStrong"
:
"{% trans 'Very strong' %}"
};
$
.
each
(
password_check_rules
,
function
(
idx
,
rules
)
{
if
(
rules
.
key
===
'id_security_password_min_length'
){
minLength
=
rules
.
value
}
});
// 初始化popover
initPopover
(
container
,
progress
,
idPassword
,
el
,
password_check_rules
,
i18n_fallback
);
// 监听事件
idPassword
.
on
(
'focus'
,
function
()
{
idPopover
.
css
(
'top'
,
top
);
idPopover
.
css
(
'left'
,
left
);
idPopover
.
css
(
'display'
,
'block'
);
});
idPassword
.
on
(
'blur'
,
function
()
{
idPopover
.
css
(
'display'
,
'none'
);
});
idPassword
.
on
(
'keyup'
,
function
(){
var
password
=
idPassword
.
val
();
checkPasswordRules
(
password
,
minLength
);
});
}
var
password_strategy_radio_input
=
'input[type=radio][name=password_strategy]'
;
function
passwordStrategyFieldsDisplay
(){
var
val
=
$
(
'input:radio[name="password_strategy"]:checked'
).
val
();
if
(
val
===
'0'
){
$
(
'#custom_password'
).
addClass
(
'hidden'
)
}
else
{
$
(
'#custom_password'
).
removeClass
(
'hidden'
)
}
}
$
(
document
).
ready
(
function
()
{
passwordCheck
();
passwordStrategyFieldsDisplay
()
}).
on
(
'change'
,
password_strategy_radio_input
,
function
(){
passwordStrategyFieldsDisplay
()
})
</script>
{% endblock %}
apps/users/views/user.py
View file @
0f399636
...
...
@@ -81,9 +81,14 @@ class UserCreateView(AdminUserRequiredMixin, SuccessMessageMixin, CreateView):
success_message
=
create_success_msg
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
()
.
get_context_data
(
**
kwargs
)
context
.
update
({
'app'
:
_
(
'Users'
),
'action'
:
_
(
'Create user'
)})
return
context
check_rules
=
get_password_check_rules
()
context
=
{
'app'
:
_
(
'Users'
),
'action'
:
_
(
'Create user'
),
'password_check_rules'
:
check_rules
,
}
kwargs
.
update
(
context
)
return
super
()
.
get_context_data
(
**
kwargs
)
def
form_valid
(
self
,
form
):
user
=
form
.
save
(
commit
=
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment