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
64db02c3
Commit
64db02c3
authored
Jun 06, 2018
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 添加用户来源 db/ldap
parent
84284112
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
211 additions
and
173 deletions
+211
-173
django.mo
apps/i18n/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/i18n/zh/LC_MESSAGES/django.po
+172
-166
user.py
apps/users/models/user.py
+12
-1
serializers.py
apps/users/serializers.py
+4
-1
signals_handler.py
apps/users/signals_handler.py
+9
-0
user_detail.html
apps/users/templates/users/user_detail.html
+4
-0
user_list.html
apps/users/templates/users/user_list.html
+4
-3
user_profile.html
apps/users/templates/users/user_profile.html
+4
-0
login.py
apps/users/views/login.py
+2
-2
No files found.
apps/i18n/zh/LC_MESSAGES/django.mo
View file @
64db02c3
No preview for this file type
apps/i18n/zh/LC_MESSAGES/django.po
View file @
64db02c3
...
@@ -8,7 +8,7 @@ msgid ""
...
@@ -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-06-0
5 17:0
3+0800\n"
"POT-Creation-Date: 2018-06-0
6 16:5
3+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"
...
@@ -17,19 +17,19 @@ msgstr ""
...
@@ -17,19 +17,19 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Content-Transfer-Encoding: 8bit\n"
#: assets/api/node.py:
106
#: assets/api/node.py:
99
msgid "New node {}"
msgid "New node {}"
msgstr "新节点 {}"
msgstr "新节点 {}"
#: assets/api/node.py:2
41
#: assets/api/node.py:2
34
msgid "更新节点资产硬件信息: {}"
msgid "更新节点资产硬件信息: {}"
msgstr ""
msgstr ""
#: assets/api/node.py:2
54
#: assets/api/node.py:2
47
msgid "测试节点下资产是否可连接: {}"
msgid "测试节点下资产是否可连接: {}"
msgstr ""
msgstr ""
#: assets/forms/asset.py:24 assets/models/asset.py:7
4
assets/models/user.py:103
#: assets/forms/asset.py:24 assets/models/asset.py:7
5
assets/models/user.py:103
#: assets/templates/assets/asset_detail.html:183
#: assets/templates/assets/asset_detail.html:183
#: assets/templates/assets/asset_detail.html:191
#: assets/templates/assets/asset_detail.html:191
#: assets/templates/assets/system_user_detail.html:175 perms/models.py:33
#: assets/templates/assets/system_user_detail.html:175 perms/models.py:33
...
@@ -37,7 +37,7 @@ msgid "Nodes"
...
@@ -37,7 +37,7 @@ msgid "Nodes"
msgstr "节点管理"
msgstr "节点管理"
#: assets/forms/asset.py:27 assets/forms/asset.py:66 assets/forms/asset.py:109
#: assets/forms/asset.py:27 assets/forms/asset.py:66 assets/forms/asset.py:109
#: assets/forms/asset.py:113 assets/models/asset.py:
79
#: assets/forms/asset.py:113 assets/models/asset.py:
80
#: assets/models/cluster.py:19 assets/models/user.py:72
#: assets/models/cluster.py:19 assets/models/user.py:72
#: assets/templates/assets/asset_detail.html:73 templates/_nav.html:25
#: assets/templates/assets/asset_detail.html:73 templates/_nav.html:25
msgid "Admin user"
msgid "Admin user"
...
@@ -53,7 +53,7 @@ msgstr "管理用户"
...
@@ -53,7 +53,7 @@ msgstr "管理用户"
msgid "Label"
msgid "Label"
msgstr "标签"
msgstr "标签"
#: assets/forms/asset.py:34 assets/forms/asset.py:73 assets/models/asset.py:7
0
#: assets/forms/asset.py:34 assets/forms/asset.py:73 assets/models/asset.py:7
1
#: assets/models/domain.py:46
#: assets/models/domain.py:46
msgid "Domain"
msgid "Domain"
msgstr "网域"
msgstr "网域"
...
@@ -90,7 +90,7 @@ msgstr "如果有多个的互相隔离的网络,设置资产属于的网域,
...
@@ -90,7 +90,7 @@ msgstr "如果有多个的互相隔离的网络,设置资产属于的网域,
msgid "Select assets"
msgid "Select assets"
msgstr "选择资产"
msgstr "选择资产"
#: assets/forms/asset.py:105 assets/models/asset.py:6
6
#: assets/forms/asset.py:105 assets/models/asset.py:6
7
#: assets/models/domain.py:44 assets/templates/assets/admin_user_assets.html:53
#: assets/models/domain.py:44 assets/templates/assets/admin_user_assets.html:53
#: assets/templates/assets/asset_detail.html:69
#: assets/templates/assets/asset_detail.html:69
#: assets/templates/assets/domain_gateway_list.html:58
#: assets/templates/assets/domain_gateway_list.html:58
...
@@ -99,7 +99,7 @@ msgid "Port"
...
@@ -99,7 +99,7 @@ msgid "Port"
msgstr "端口"
msgstr "端口"
#: assets/forms/domain.py:14 assets/forms/label.py:13
#: assets/forms/domain.py:14 assets/forms/label.py:13
#: assets/models/asset.py:22
9
assets/templates/assets/admin_user_list.html:25
#: assets/models/asset.py:22
3
assets/templates/assets/admin_user_list.html:25
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_list.html:15
#: assets/templates/assets/domain_list.html:15
#: assets/templates/assets/label_list.html:16
#: assets/templates/assets/label_list.html:16
...
@@ -136,8 +136,8 @@ msgstr "资产"
...
@@ -136,8 +136,8 @@ msgstr "资产"
#: 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:154 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:1
4
#: terminal/templates/terminal/terminal_list.html:29 users/models/group.py:1
2
#: users/models/user.py:4
2
users/templates/users/_select_user_modal.html:13
#: users/models/user.py:4
9
users/templates/users/_select_user_modal.html:13
#: users/templates/users/user_detail.html:63
#: users/templates/users/user_detail.html:63
#: users/templates/users/user_group_detail.html:55
#: users/templates/users/user_group_detail.html:55
#: users/templates/users/user_group_list.html:12
#: users/templates/users/user_group_list.html:12
...
@@ -155,7 +155,7 @@ msgstr "名称"
...
@@ -155,7 +155,7 @@ msgstr "名称"
#: assets/templates/assets/system_user_list.html:27
#: assets/templates/assets/system_user_list.html:27
#: perms/templates/perms/asset_permission_user.html:55 users/forms.py:13
#: perms/templates/perms/asset_permission_user.html:55 users/forms.py:13
#: users/forms.py:21 users/forms.py:30 users/models/authentication.py:45
#: users/forms.py:21 users/forms.py:30 users/models/authentication.py:45
#: users/models/user.py:4
0
users/templates/users/_select_user_modal.html:14
#: users/models/user.py:4
7
users/templates/users/_select_user_modal.html:14
#: users/templates/users/login.html:56
#: users/templates/users/login.html:56
#: users/templates/users/login_log_list.html:49
#: users/templates/users/login_log_list.html:49
#: users/templates/users/user_detail.html:67
#: users/templates/users/user_detail.html:67
...
@@ -180,7 +180,7 @@ msgstr "密码或密钥密码"
...
@@ -180,7 +180,7 @@ msgstr "密码或密钥密码"
msgid "Password"
msgid "Password"
msgstr "密码"
msgstr "密码"
#: assets/forms/user.py:28 users/models/user.py:
69
#: assets/forms/user.py:28 users/models/user.py:
76
msgid "Private key"
msgid "Private key"
msgstr "ssh私钥"
msgstr "ssh私钥"
...
@@ -202,7 +202,7 @@ msgid ""
...
@@ -202,7 +202,7 @@ msgid ""
"than 2 system user"
"than 2 system user"
msgstr "高优先级的系统用户将会作为默认登录用户"
msgstr "高优先级的系统用户将会作为默认登录用户"
#: assets/models/asset.py:6
2
assets/models/domain.py:43
#: assets/models/asset.py:6
3
assets/models/domain.py:43
#: assets/templates/assets/_asset_list_modal.html:46
#: assets/templates/assets/_asset_list_modal.html:46
#: assets/templates/assets/admin_user_assets.html:52
#: assets/templates/assets/admin_user_assets.html:52
#: assets/templates/assets/asset_detail.html:61
#: assets/templates/assets/asset_detail.html:61
...
@@ -217,7 +217,7 @@ msgstr "高优先级的系统用户将会作为默认登录用户"
...
@@ -217,7 +217,7 @@ msgstr "高优先级的系统用户将会作为默认登录用户"
msgid "IP"
msgid "IP"
msgstr "IP"
msgstr "IP"
#: assets/models/asset.py:6
5
assets/templates/assets/_asset_list_modal.html:45
#: assets/models/asset.py:6
6
assets/templates/assets/_asset_list_modal.html:45
#: assets/templates/assets/admin_user_assets.html:51
#: assets/templates/assets/admin_user_assets.html:51
#: 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
...
@@ -229,82 +229,82 @@ msgstr "IP"
...
@@ -229,82 +229,82 @@ msgstr "IP"
msgid "Hostname"
msgid "Hostname"
msgstr "主机名"
msgstr "主机名"
#: assets/models/asset.py:6
8
assets/templates/assets/asset_detail.html:97
#: assets/models/asset.py:6
9
assets/templates/assets/asset_detail.html:97
msgid "Platform"
msgid "Platform"
msgstr "系统平台"
msgstr "系统平台"
#: assets/models/asset.py:7
5
assets/models/domain.py:48
#: assets/models/asset.py:7
6
assets/models/domain.py:48
#: assets/models/label.py:20 assets/templates/assets/asset_detail.html:105
#: assets/models/label.py:20 assets/templates/assets/asset_detail.html:105
msgid "Is active"
msgid "Is active"
msgstr "激活"
msgstr "激活"
#: assets/models/asset.py:8
4
assets/templates/assets/asset_detail.html:65
#: assets/models/asset.py:8
5
assets/templates/assets/asset_detail.html:65
msgid "Public IP"
msgid "Public IP"
msgstr "公网IP"
msgstr "公网IP"
#: assets/models/asset.py:8
6
assets/templates/assets/asset_detail.html:113
#: assets/models/asset.py:8
7
assets/templates/assets/asset_detail.html:113
msgid "Asset number"
msgid "Asset number"
msgstr "资产编号"
msgstr "资产编号"
#: assets/models/asset.py:9
0
assets/templates/assets/asset_detail.html:77
#: assets/models/asset.py:9
1
assets/templates/assets/asset_detail.html:77
msgid "Vendor"
msgid "Vendor"
msgstr "制造商"
msgstr "制造商"
#: assets/models/asset.py:9
2
assets/templates/assets/asset_detail.html:81
#: assets/models/asset.py:9
3
assets/templates/assets/asset_detail.html:81
msgid "Model"
msgid "Model"
msgstr "型号"
msgstr "型号"
#: assets/models/asset.py:9
4
assets/templates/assets/asset_detail.html:109
#: assets/models/asset.py:9
5
assets/templates/assets/asset_detail.html:109
msgid "Serial number"
msgid "Serial number"
msgstr "序列号"
msgstr "序列号"
#: assets/models/asset.py:9
7
#: assets/models/asset.py:9
8
msgid "CPU model"
msgid "CPU model"
msgstr "CPU型号"
msgstr "CPU型号"
#: assets/models/asset.py:9
8
#: assets/models/asset.py:9
9
msgid "CPU count"
msgid "CPU count"
msgstr "CPU数量"
msgstr "CPU数量"
#: assets/models/asset.py:
99
#: assets/models/asset.py:
100
msgid "CPU cores"
msgid "CPU cores"
msgstr "CPU核数"
msgstr "CPU核数"
#: assets/models/asset.py:10
1
assets/templates/assets/asset_detail.html:89
#: assets/models/asset.py:10
2
assets/templates/assets/asset_detail.html:89
msgid "Memory"
msgid "Memory"
msgstr "内存"
msgstr "内存"
#: assets/models/asset.py:10
3
#: assets/models/asset.py:10
4
msgid "Disk total"
msgid "Disk total"
msgstr "硬盘大小"
msgstr "硬盘大小"
#: assets/models/asset.py:10
5
#: assets/models/asset.py:10
6
msgid "Disk info"
msgid "Disk info"
msgstr "硬盘信息"
msgstr "硬盘信息"
#: assets/models/asset.py:10
8
assets/templates/assets/asset_detail.html:101
#: assets/models/asset.py:10
9
assets/templates/assets/asset_detail.html:101
msgid "OS"
msgid "OS"
msgstr "操作系统"
msgstr "操作系统"
#: assets/models/asset.py:11
0
#: assets/models/asset.py:11
1
msgid "OS version"
msgid "OS version"
msgstr "系统版本"
msgstr "系统版本"
#: assets/models/asset.py:11
2
#: assets/models/asset.py:11
3
msgid "OS arch"
msgid "OS arch"
msgstr "系统架构"
msgstr "系统架构"
#: assets/models/asset.py:11
4
#: assets/models/asset.py:11
5
msgid "Hostname raw"
msgid "Hostname raw"
msgstr "主机名原始"
msgstr "主机名原始"
#: assets/models/asset.py:11
8
assets/templates/assets/asset_create.html:33
#: assets/models/asset.py:11
9
assets/templates/assets/asset_create.html:33
#: assets/templates/assets/asset_detail.html:220
#: assets/templates/assets/asset_detail.html:220
#: assets/templates/assets/asset_update.html:38 templates/_nav.html:27
#: assets/templates/assets/asset_update.html:38 templates/_nav.html:27
msgid "Labels"
msgid "Labels"
msgstr "标签管理"
msgstr "标签管理"
#: assets/models/asset.py:12
0
assets/models/base.py:29
#: assets/models/asset.py:12
1
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
...
@@ -312,11 +312,11 @@ msgstr "标签管理"
...
@@ -312,11 +312,11 @@ msgstr "标签管理"
#: assets/templates/assets/system_user_detail.html:96
#: assets/templates/assets/system_user_detail.html:96
#: ops/templates/ops/adhoc_detail.html:86 perms/models.py:38 perms/models.py:81
#: ops/templates/ops/adhoc_detail.html:86 perms/models.py:38 perms/models.py:81
#: perms/templates/perms/asset_permission_detail.html:98
#: perms/templates/perms/asset_permission_detail.html:98
#: users/models/user.py:
83 users/templates/users/user_detail.html:107
#: users/models/user.py:
90 users/templates/users/user_detail.html:111
msgid "Created by"
msgid "Created by"
msgstr "创建者"
msgstr "创建者"
#: assets/models/asset.py:12
3
assets/models/cluster.py:26
#: assets/models/asset.py:12
4
assets/models/cluster.py:26
#: assets/models/domain.py:20 assets/models/group.py:22
#: assets/models/domain.py:20 assets/models/group.py:22
#: assets/models/label.py:23 assets/templates/assets/admin_user_detail.html:64
#: assets/models/label.py:23 assets/templates/assets/admin_user_detail.html:64
#: assets/templates/assets/domain_detail.html:68
#: assets/templates/assets/domain_detail.html:68
...
@@ -324,12 +324,12 @@ msgstr "创建者"
...
@@ -324,12 +324,12 @@ msgstr "创建者"
#: ops/templates/ops/adhoc_detail.html:90 ops/templates/ops/task_detail.html:63
#: ops/templates/ops/adhoc_detail.html:90 ops/templates/ops/task_detail.html:63
#: perms/models.py:39 perms/models.py:82
#: perms/models.py:39 perms/models.py:82
#: perms/templates/perms/asset_permission_detail.html:94
#: perms/templates/perms/asset_permission_detail.html:94
#: terminal/templates/terminal/terminal_detail.html:59 users/models/group.py:1
7
#: terminal/templates/terminal/terminal_detail.html:59 users/models/group.py:1
5
#: users/templates/users/user_group_detail.html:63
#: users/templates/users/user_group_detail.html:63
msgid "Date created"
msgid "Date created"
msgstr "创建日期"
msgstr "创建日期"
#: assets/models/asset.py:12
5
assets/models/base.py:26
#: assets/models/asset.py:12
6
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
...
@@ -342,11 +342,11 @@ msgstr "创建日期"
...
@@ -342,11 +342,11 @@ msgstr "创建日期"
#: assets/templates/assets/system_user_list.html:33 common/models.py:30
#: assets/templates/assets/system_user_list.html:33 common/models.py:30
#: ops/models/adhoc.py:42 perms/models.py:40 perms/models.py:83
#: ops/models/adhoc.py:42 perms/models.py:40 perms/models.py:83
#: perms/templates/perms/asset_permission_detail.html:102 terminal/models.py:26
#: perms/templates/perms/asset_permission_detail.html:102 terminal/models.py:26
#: terminal/templates/terminal/terminal_detail.html:63 users/models/group.py:1
5
#: terminal/templates/terminal/terminal_detail.html:63 users/models/group.py:1
3
#: users/models/user.py:
75 users/templates/users/user_detail.html:119
#: users/models/user.py:
82 users/templates/users/user_detail.html:123
#: users/templates/users/user_group_detail.html:67
#: users/templates/users/user_group_detail.html:67
#: users/templates/users/user_group_list.html:14
#: users/templates/users/user_group_list.html:14
#: users/templates/users/user_profile.html:1
26
#: users/templates/users/user_profile.html:1
30
msgid "Comment"
msgid "Comment"
msgstr "备注"
msgstr "备注"
...
@@ -366,7 +366,7 @@ msgstr "带宽"
...
@@ -366,7 +366,7 @@ msgstr "带宽"
msgid "Contact"
msgid "Contact"
msgstr "联系人"
msgstr "联系人"
#: assets/models/cluster.py:22 users/models/user.py:6
1
#: assets/models/cluster.py:22 users/models/user.py:6
8
#: users/templates/users/user_detail.html:76
#: users/templates/users/user_detail.html:76
msgid "Phone"
msgid "Phone"
msgstr "手机"
msgstr "手机"
...
@@ -392,7 +392,7 @@ msgid "Default"
...
@@ -392,7 +392,7 @@ msgid "Default"
msgstr "默认"
msgstr "默认"
#: assets/models/cluster.py:36 assets/models/label.py:13
#: assets/models/cluster.py:36 assets/models/label.py:13
#: users/models/user.py:3
30
#: users/models/user.py:3
47
msgid "System"
msgid "System"
msgstr "系统"
msgstr "系统"
...
@@ -432,9 +432,9 @@ msgstr "默认资产组"
...
@@ -432,9 +432,9 @@ msgstr "默认资产组"
#: 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
#: terminal/templates/terminal/session_list.html:71 users/forms.py:281
#: terminal/templates/terminal/session_list.html:71 users/forms.py:281
#: users/models/user.py:3
0 users/models/user.py:318
#: users/models/user.py:3
1 users/models/user.py:335
#: users/templates/users/user_group_detail.html:78
#: users/templates/users/user_group_detail.html:78
#: users/templates/users/user_group_list.html:13 users/views/user.py:3
60
#: users/templates/users/user_group_list.html:13 users/views/user.py:3
59
msgid "User"
msgid "User"
msgstr "用户"
msgstr "用户"
...
@@ -640,7 +640,7 @@ msgstr "其它"
...
@@ -640,7 +640,7 @@ msgstr "其它"
#: users/templates/users/_user.html:46
#: users/templates/users/_user.html:46
#: users/templates/users/user_bulk_update.html:23
#: users/templates/users/user_bulk_update.html:23
#: users/templates/users/user_password_update.html:70
#: users/templates/users/user_password_update.html:70
#: users/templates/users/user_profile.html:18
4
#: users/templates/users/user_profile.html:18
8
#: users/templates/users/user_profile_update.html:63
#: users/templates/users/user_profile_update.html:63
#: users/templates/users/user_pubkey_update.html:70
#: users/templates/users/user_pubkey_update.html:70
#: users/templates/users/user_pubkey_update.html:76
#: users/templates/users/user_pubkey_update.html:76
...
@@ -667,7 +667,7 @@ msgstr "重置"
...
@@ -667,7 +667,7 @@ msgstr "重置"
#: users/templates/users/_user.html:47
#: users/templates/users/_user.html:47
#: users/templates/users/forgot_password.html:44
#: users/templates/users/forgot_password.html:44
#: users/templates/users/user_bulk_update.html:24
#: users/templates/users/user_bulk_update.html:24
#: users/templates/users/user_list.html:4
4
#: users/templates/users/user_list.html:4
5
#: users/templates/users/user_password_update.html:71
#: users/templates/users/user_password_update.html:71
#: users/templates/users/user_profile_update.html:64
#: users/templates/users/user_profile_update.html:64
#: users/templates/users/user_pubkey_update.html:77
#: users/templates/users/user_pubkey_update.html:77
...
@@ -744,9 +744,9 @@ msgstr "测试"
...
@@ -744,9 +744,9 @@ msgstr "测试"
#: users/templates/users/user_detail.html:25
#: users/templates/users/user_detail.html:25
#: users/templates/users/user_group_detail.html:28
#: users/templates/users/user_group_detail.html:28
#: users/templates/users/user_group_list.html:43
#: users/templates/users/user_group_list.html:43
#: users/templates/users/user_list.html:7
6
#: users/templates/users/user_list.html:7
7
#: users/templates/users/user_profile.html:1
47
#: users/templates/users/user_profile.html:1
51
#: users/templates/users/user_profile.html:1
76
#: users/templates/users/user_profile.html:1
80
msgid "Update"
msgid "Update"
msgstr "更新"
msgstr "更新"
...
@@ -768,8 +768,8 @@ msgstr "更新"
...
@@ -768,8 +768,8 @@ msgstr "更新"
#: users/templates/users/user_detail.html:30
#: users/templates/users/user_detail.html:30
#: users/templates/users/user_group_detail.html:32
#: users/templates/users/user_group_detail.html:32
#: users/templates/users/user_group_list.html:45
#: users/templates/users/user_group_list.html:45
#: users/templates/users/user_list.html:8
0
#: users/templates/users/user_list.html:8
1
#: users/templates/users/user_list.html:8
4
#: users/templates/users/user_list.html:8
5
msgid "Delete"
msgid "Delete"
msgstr "删除"
msgstr "删除"
...
@@ -784,17 +784,17 @@ msgstr "选择节点"
...
@@ -784,17 +784,17 @@ msgstr "选择节点"
#: assets/templates/assets/admin_user_detail.html:100
#: assets/templates/assets/admin_user_detail.html:100
#: assets/templates/assets/asset_detail.html:200
#: assets/templates/assets/asset_detail.html:200
#: assets/templates/assets/asset_list.html:63
9
#: assets/templates/assets/asset_list.html:63
8
#: assets/templates/assets/system_user_detail.html:192
#: assets/templates/assets/system_user_detail.html:192
#: assets/templates/assets/system_user_list.html:138 templates/_modal.html:22
#: assets/templates/assets/system_user_list.html:138 templates/_modal.html:22
#: terminal/templates/terminal/session_detail.html:108
#: terminal/templates/terminal/session_detail.html:108
#: users/templates/users/user_detail.html:36
2
#: users/templates/users/user_detail.html:36
6
#: users/templates/users/user_detail.html:3
87
#: users/templates/users/user_detail.html:3
91
#: users/templates/users/user_detail.html:41
0
#: users/templates/users/user_detail.html:41
4
#: users/templates/users/user_group_create_update.html:32
#: users/templates/users/user_group_create_update.html:32
#: users/templates/users/user_group_list.html:86
#: users/templates/users/user_group_list.html:86
#: users/templates/users/user_list.html:
199
#: users/templates/users/user_list.html:
200
#: users/templates/users/user_profile.html:2
18
#: users/templates/users/user_profile.html:2
22
msgid "Confirm"
msgid "Confirm"
msgstr "确认"
msgstr "确认"
...
@@ -827,7 +827,7 @@ msgstr "比例"
...
@@ -827,7 +827,7 @@ msgstr "比例"
#: terminal/templates/terminal/session_list.html:80
#: terminal/templates/terminal/session_list.html:80
#: terminal/templates/terminal/terminal_list.html:36
#: terminal/templates/terminal/terminal_list.html:36
#: users/templates/users/user_group_list.html:15
#: users/templates/users/user_group_list.html:15
#: users/templates/users/user_list.html:2
8
#: users/templates/users/user_list.html:2
9
msgid "Action"
msgid "Action"
msgstr "动作"
msgstr "动作"
...
@@ -844,15 +844,15 @@ msgid "Disk"
...
@@ -844,15 +844,15 @@ msgid "Disk"
msgstr "硬盘"
msgstr "硬盘"
#: assets/templates/assets/asset_detail.html:121
#: assets/templates/assets/asset_detail.html:121
#: users/templates/users/user_detail.html:11
1
#: users/templates/users/user_detail.html:11
5
#: users/templates/users/user_profile.html:10
0
#: users/templates/users/user_profile.html:10
4
msgid "Date joined"
msgid "Date joined"
msgstr "创建日期"
msgstr "创建日期"
#: assets/templates/assets/asset_detail.html:137
#: assets/templates/assets/asset_detail.html:137
#: terminal/templates/terminal/session_detail.html:81
#: terminal/templates/terminal/session_detail.html:81
#: users/templates/users/user_detail.html:13
0
#: users/templates/users/user_detail.html:13
4
#: users/templates/users/user_profile.html:1
38
#: users/templates/users/user_profile.html:1
42
msgid "Quick modify"
msgid "Quick modify"
msgstr "快速修改"
msgstr "快速修改"
...
@@ -865,10 +865,10 @@ msgstr "快速修改"
...
@@ -865,10 +865,10 @@ msgstr "快速修改"
#: perms/templates/perms/asset_permission_list.html:59
#: perms/templates/perms/asset_permission_list.html:59
#: terminal/templates/terminal/terminal_list.html:34
#: terminal/templates/terminal/terminal_list.html:34
#: users/templates/users/_select_user_modal.html:18
#: users/templates/users/_select_user_modal.html:18
#: users/templates/users/user_detail.html:1
36
#: users/templates/users/user_detail.html:1
40
#: users/templates/users/user_granted_asset.html:46
#: users/templates/users/user_granted_asset.html:46
#: users/templates/users/user_group_granted_asset.html:46
#: users/templates/users/user_group_granted_asset.html:46
#: users/templates/users/user_list.html:2
7
#: users/templates/users/user_list.html:2
8
#: users/templates/users/user_profile.html:63
#: users/templates/users/user_profile.html:63
msgid "Active"
msgid "Active"
msgstr "激活中"
msgstr "激活中"
...
@@ -882,8 +882,8 @@ msgid "Refresh"
...
@@ -882,8 +882,8 @@ msgid "Refresh"
msgstr "刷新"
msgstr "刷新"
#: assets/templates/assets/asset_detail.html:300
#: assets/templates/assets/asset_detail.html:300
#: users/templates/users/user_detail.html:28
2
#: users/templates/users/user_detail.html:28
6
#: users/templates/users/user_detail.html:3
09
#: users/templates/users/user_detail.html:3
13
msgid "Update successfully!"
msgid "Update successfully!"
msgstr "更新成功"
msgstr "更新成功"
...
@@ -906,12 +906,12 @@ msgid "Hardware"
...
@@ -906,12 +906,12 @@ msgid "Hardware"
msgstr "硬件"
msgstr "硬件"
#: assets/templates/assets/asset_list.html:100
#: assets/templates/assets/asset_list.html:100
#: users/templates/users/user_list.html:3
7
#: users/templates/users/user_list.html:3
8
msgid "Delete selected"
msgid "Delete selected"
msgstr "批量删除"
msgstr "批量删除"
#: assets/templates/assets/asset_list.html:101
#: assets/templates/assets/asset_list.html:101
#: users/templates/users/user_list.html:3
8
#: users/templates/users/user_list.html:3
9
msgid "Update selected"
msgid "Update selected"
msgstr "批量更新"
msgstr "批量更新"
...
@@ -920,12 +920,12 @@ msgid "Remove from this node"
...
@@ -920,12 +920,12 @@ msgid "Remove from this node"
msgstr "从节点移除"
msgstr "从节点移除"
#: assets/templates/assets/asset_list.html:103
#: assets/templates/assets/asset_list.html:103
#: users/templates/users/user_list.html:
39
#: users/templates/users/user_list.html:
40
msgid "Deactive selected"
msgid "Deactive selected"
msgstr "禁用所选"
msgstr "禁用所选"
#: assets/templates/assets/asset_list.html:104
#: assets/templates/assets/asset_list.html:104
#: users/templates/users/user_list.html:4
0
#: users/templates/users/user_list.html:4
1
msgid "Active selected"
msgid "Active selected"
msgstr "激活所选"
msgstr "激活所选"
...
@@ -977,29 +977,29 @@ msgstr "存在子节点,不能删除"
...
@@ -977,29 +977,29 @@ msgstr "存在子节点,不能删除"
msgid "Have assets, cancel"
msgid "Have assets, cancel"
msgstr "存在资产,不能删除"
msgstr "存在资产,不能删除"
#: assets/templates/assets/asset_list.html:63
4
#: assets/templates/assets/asset_list.html:63
3
#: assets/templates/assets/system_user_list.html:133
#: assets/templates/assets/system_user_list.html:133
#: users/templates/users/user_detail.html:3
57
#: users/templates/users/user_detail.html:3
61
#: users/templates/users/user_detail.html:38
2
#: users/templates/users/user_detail.html:38
6
#: users/templates/users/user_group_list.html:81
#: users/templates/users/user_group_list.html:81
#: users/templates/users/user_list.html:19
4
#: users/templates/users/user_list.html:19
5
msgid "Are you sure?"
msgid "Are you sure?"
msgstr "你确认吗?"
msgstr "你确认吗?"
#: assets/templates/assets/asset_list.html:63
5
#: assets/templates/assets/asset_list.html:63
4
msgid "This will delete the selected assets !!!"
msgid "This will delete the selected assets !!!"
msgstr "删除选择资产"
msgstr "删除选择资产"
#: assets/templates/assets/asset_list.html:64
3
#: assets/templates/assets/asset_list.html:64
2
msgid "Asset Deleted."
msgid "Asset Deleted."
msgstr "已被删除"
msgstr "已被删除"
#: assets/templates/assets/asset_list.html:64
4
#: assets/templates/assets/asset_list.html:64
3
#: assets/templates/assets/asset_list.html:64
9
#: assets/templates/assets/asset_list.html:64
8
msgid "Asset Delete"
msgid "Asset Delete"
msgstr "删除"
msgstr "删除"
#: assets/templates/assets/asset_list.html:64
8
#: assets/templates/assets/asset_list.html:64
7
msgid "Asset Deleting failed."
msgid "Asset Deleting failed."
msgstr "删除失败"
msgstr "删除失败"
...
@@ -1239,11 +1239,11 @@ msgstr "FTP日志"
...
@@ -1239,11 +1239,11 @@ msgstr "FTP日志"
msgid "Test mail sent to {}, please check"
msgid "Test mail sent to {}, please check"
msgstr "邮件已经发送{}, 请检查"
msgstr "邮件已经发送{}, 请检查"
#: common/api.py:
5
2
#: common/api.py:
4
2
msgid "Test ldap success"
msgid "Test ldap success"
msgstr "连接LDAP成功"
msgstr "连接LDAP成功"
#: common/api.py:
9
0
#: common/api.py:
8
0
msgid "Match {} s users"
msgid "Match {} s users"
msgstr "匹配 {} 个用户"
msgstr "匹配 {} 个用户"
...
@@ -1414,41 +1414,41 @@ msgstr "开启后,用户登录必须使用MFA二次认证(对所有用户有
...
@@ -1414,41 +1414,41 @@ msgstr "开启后,用户登录必须使用MFA二次认证(对所有用户有
msgid "Password minimum length"
msgid "Password minimum length"
msgstr "密码最小长度 "
msgstr "密码最小长度 "
#: common/forms.py:19
0
#: common/forms.py:19
1
msgid "Must contain capital letters"
msgid "Must contain capital letters"
msgstr "必须包含大写字母"
msgstr "必须包含大写字母"
#: common/forms.py:19
2
#: common/forms.py:19
3
msgid ""
msgid ""
"After opening, the user password changes and resets must contain uppercase "
"After opening, the user password changes and resets must contain uppercase "
"letters"
"letters"
msgstr "开启后,用户密码修改、重置必须包含大写字母"
msgstr "开启后,用户密码修改、重置必须包含大写字母"
#: common/forms.py:19
8
#: common/forms.py:19
9
msgid "Must contain lowercase letters"
msgid "Must contain lowercase letters"
msgstr "必须包含小写字母"
msgstr "必须包含小写字母"
#: common/forms.py:
199
#: common/forms.py:
200
msgid ""
msgid ""
"After opening, the user password changes and resets must contain lowercase "
"After opening, the user password changes and resets must contain lowercase "
"letters"
"letters"
msgstr "开启后,用户密码修改、重置必须包含小写字母"
msgstr "开启后,用户密码修改、重置必须包含小写字母"
#: common/forms.py:20
5
#: common/forms.py:20
6
msgid "Must contain numeric characters"
msgid "Must contain numeric characters"
msgstr "必须包含数字字符"
msgstr "必须包含数字字符"
#: common/forms.py:20
6
#: common/forms.py:20
7
msgid ""
msgid ""
"After opening, the user password changes and resets must contain numeric "
"After opening, the user password changes and resets must contain numeric "
"characters"
"characters"
msgstr "开启后,用户密码修改、重置必须包含数字字符"
msgstr "开启后,用户密码修改、重置必须包含数字字符"
#: common/forms.py:21
2
#: common/forms.py:21
3
msgid "Must contain special characters"
msgid "Must contain special characters"
msgstr "必须包含特殊字符"
msgstr "必须包含特殊字符"
#: common/forms.py:21
3
#: common/forms.py:21
4
msgid ""
msgid ""
"After opening, the user password changes and resets must contain special "
"After opening, the user password changes and resets must contain special "
"characters"
"characters"
...
@@ -1813,9 +1813,9 @@ msgstr "选择用户"
...
@@ -1813,9 +1813,9 @@ msgstr "选择用户"
#: perms/forms.py:34 perms/models.py:31 perms/models.py:77
#: perms/forms.py:34 perms/models.py:31 perms/models.py:77
#: perms/templates/perms/asset_permission_list.html:55
#: perms/templates/perms/asset_permission_list.html:55
#: perms/templates/perms/asset_permission_list.html:136 templates/_nav.html:14
#: perms/templates/perms/asset_permission_list.html:136 templates/_nav.html:14
#: users/models/group.py:2
5 users/models/user.py:48
#: users/models/group.py:2
3 users/models/user.py:55
#: users/templates/users/_select_user_modal.html:16
#: users/templates/users/_select_user_modal.html:16
#: users/templates/users/user_detail.html:1
88
#: users/templates/users/user_detail.html:1
92
#: users/templates/users/user_list.html:26
#: users/templates/users/user_list.html:26
msgid "User group"
msgid "User group"
msgstr "用户组"
msgstr "用户组"
...
@@ -1830,8 +1830,8 @@ msgstr ""
...
@@ -1830,8 +1830,8 @@ msgstr ""
#: perms/models.py:37 perms/models.py:80
#: perms/models.py:37 perms/models.py:80
#: perms/templates/perms/asset_permission_detail.html:90
#: perms/templates/perms/asset_permission_detail.html:90
#: users/models/user.py:8
0 users/templates/users/user_detail.html:103
#: users/models/user.py:8
7 users/templates/users/user_detail.html:107
#: users/templates/users/user_profile.html:1
08
#: users/templates/users/user_profile.html:1
12
msgid "Date expired"
msgid "Date expired"
msgstr "失效日期"
msgstr "失效日期"
...
@@ -1868,7 +1868,7 @@ msgid "Add node to this permission"
...
@@ -1868,7 +1868,7 @@ msgid "Add node to this permission"
msgstr "添加节点"
msgstr "添加节点"
#: perms/templates/perms/asset_permission_asset.html:125
#: perms/templates/perms/asset_permission_asset.html:125
#: users/templates/users/user_detail.html:20
5
#: users/templates/users/user_detail.html:20
9
msgid "Join"
msgid "Join"
msgstr "加入"
msgstr "加入"
...
@@ -1965,7 +1965,7 @@ msgstr "文档"
...
@@ -1965,7 +1965,7 @@ msgstr "文档"
#: users/templates/users/user_profile.html:17
#: users/templates/users/user_profile.html:17
#: users/templates/users/user_profile_update.html:37
#: users/templates/users/user_profile_update.html:37
#: users/templates/users/user_profile_update.html:57
#: users/templates/users/user_profile_update.html:57
#: users/templates/users/user_pubkey_update.html:37 users/views/user.py:34
2
#: users/templates/users/user_pubkey_update.html:37 users/views/user.py:34
1
msgid "Profile"
msgid "Profile"
msgstr "个人信息"
msgstr "个人信息"
...
@@ -2022,9 +2022,9 @@ msgstr "关闭"
...
@@ -2022,9 +2022,9 @@ 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:2
84 users/views/login.py:342
users/views/user.py:65
#: users/views/login.py:2
77 users/views/login.py:335
users/views/user.py:65
#: users/views/user.py:80 users/views/user.py:102 users/views/user.py:173
#: users/views/user.py:80 users/views/user.py:102 users/views/user.py:173
#: users/views/user.py:328 users/views/user.py:37
9 users/views/user.py:414
#: users/views/user.py:328 users/views/user.py:37
8 users/views/user.py:413
msgid "Users"
msgid "Users"
msgstr "用户管理"
msgstr "用户管理"
...
@@ -2338,7 +2338,7 @@ msgstr ""
...
@@ -2338,7 +2338,7 @@ msgstr ""
msgid "MFA code"
msgid "MFA code"
msgstr "MFA 验证码"
msgstr "MFA 验证码"
#: users/forms.py:49 users/models/user.py:5
2
#: users/forms.py:49 users/models/user.py:5
9
#: users/templates/users/_select_user_modal.html:15
#: users/templates/users/_select_user_modal.html:15
#: users/templates/users/user_detail.html:87
#: users/templates/users/user_detail.html:87
#: users/templates/users/user_list.html:25
#: users/templates/users/user_list.html:25
...
@@ -2358,7 +2358,7 @@ msgstr ""
...
@@ -2358,7 +2358,7 @@ msgstr ""
msgid "Paste user id_rsa.pub here."
msgid "Paste user id_rsa.pub here."
msgstr "复制用户公钥到这里"
msgstr "复制用户公钥到这里"
#: users/forms.py:72 users/templates/users/user_detail.html:
196
#: users/forms.py:72 users/templates/users/user_detail.html:
200
msgid "Join user groups"
msgid "Join user groups"
msgstr "添加到用户组"
msgstr "添加到用户组"
...
@@ -2366,7 +2366,7 @@ msgstr "添加到用户组"
...
@@ -2366,7 +2366,7 @@ msgstr "添加到用户组"
msgid "Public key should not be the same as your old one."
msgid "Public key should not be the same as your old one."
msgstr "不能和原来的密钥相同"
msgstr "不能和原来的密钥相同"
#: users/forms.py:87 users/forms.py:220 users/serializers.py:4
5
#: users/forms.py:87 users/forms.py:220 users/serializers.py:4
8
msgid "Not a valid ssh public key"
msgid "Not a valid ssh public key"
msgstr "ssh密钥不合法"
msgstr "ssh密钥不合法"
...
@@ -2383,7 +2383,7 @@ msgstr ""
...
@@ -2383,7 +2383,7 @@ msgstr ""
msgid "* Enable MFA authentication to make the account more secure."
msgid "* Enable MFA authentication to make the account more secure."
msgstr "* 启用MFA认证,使账号更加安全."
msgstr "* 启用MFA认证,使账号更加安全."
#: users/forms.py:142 users/models/user.py:
64
#: users/forms.py:142 users/models/user.py:
71
#: users/templates/users/first_login.html:45
#: users/templates/users/first_login.html:45
msgid "MFA"
msgid "MFA"
msgstr "MFA"
msgstr "MFA"
...
@@ -2431,7 +2431,7 @@ msgstr "自动配置并下载SSH密钥"
...
@@ -2431,7 +2431,7 @@ msgstr "自动配置并下载SSH密钥"
msgid "Paste your id_rsa.pub here."
msgid "Paste your id_rsa.pub here."
msgstr "复制你的公钥到这里"
msgstr "复制你的公钥到这里"
#: users/forms.py:231 users/models/user.py:7
2
#: users/forms.py:231 users/models/user.py:7
9
#: users/templates/users/first_login.html:42
#: users/templates/users/first_login.html:42
#: users/templates/users/user_password_update.html:45
#: users/templates/users/user_password_update.html:45
#: users/templates/users/user_profile.html:68
#: users/templates/users/user_profile.html:68
...
@@ -2464,43 +2464,49 @@ msgstr "Agent"
...
@@ -2464,43 +2464,49 @@ msgstr "Agent"
msgid "Date login"
msgid "Date login"
msgstr "登录日期"
msgstr "登录日期"
#: users/models/user.py:
29 users/models/user.py:326
#: users/models/user.py:
30 users/models/user.py:343
msgid "Administrator"
msgid "Administrator"
msgstr "管理员"
msgstr "管理员"
#: users/models/user.py:3
1
#: users/models/user.py:3
2
msgid "Application"
msgid "Application"
msgstr "应用程序"
msgstr "应用程序"
#: users/models/user.py:3
4
users/templates/users/user_profile.html:92
#: users/models/user.py:3
5
users/templates/users/user_profile.html:92
#: users/templates/users/user_profile.html:1
59
#: users/templates/users/user_profile.html:1
63
#: users/templates/users/user_profile.html:16
2
#: users/templates/users/user_profile.html:16
6
msgid "Disable"
msgid "Disable"
msgstr "禁用"
msgstr "禁用"
#: users/models/user.py:3
5
users/templates/users/user_profile.html:90
#: users/models/user.py:3
6
users/templates/users/user_profile.html:90
#: users/templates/users/user_profile.html:1
66
#: users/templates/users/user_profile.html:1
70
msgid "Enable"
msgid "Enable"
msgstr "启用"
msgstr "启用"
#: users/models/user.py:3
6
users/templates/users/user_profile.html:88
#: users/models/user.py:3
7
users/templates/users/user_profile.html:88
msgid "Force enable"
msgid "Force enable"
msgstr "强制启用"
msgstr "强制启用"
#: users/models/user.py:
44
users/templates/users/user_detail.html:71
#: users/models/user.py:
51
users/templates/users/user_detail.html:71
#: users/templates/users/user_profile.html:59
#: users/templates/users/user_profile.html:59
msgid "Email"
msgid "Email"
msgstr "邮件"
msgstr "邮件"
#: users/models/user.py:
55
#: users/models/user.py:
62
msgid "Avatar"
msgid "Avatar"
msgstr "头像"
msgstr "头像"
#: users/models/user.py:
58
users/templates/users/user_detail.html:82
#: users/models/user.py:
65
users/templates/users/user_detail.html:82
msgid "Wechat"
msgid "Wechat"
msgstr "微信"
msgstr "微信"
#: users/models/user.py:329
#: users/models/user.py:94 users/templates/users/user_detail.html:103
#: users/templates/users/user_list.html:27
#: users/templates/users/user_profile.html:100
msgid "Source"
msgstr "用户来源"
#: users/models/user.py:346
msgid "Administrator is the super user of system"
msgid "Administrator is the super user of system"
msgstr "Administrator是初始的超级管理员"
msgstr "Administrator是初始的超级管理员"
...
@@ -2617,7 +2623,7 @@ msgid "Can't provide security? Please contact the administrator!"
...
@@ -2617,7 +2623,7 @@ msgid "Can't provide security? Please contact the administrator!"
msgstr "如果不能提供MFA验证码,请联系管理员!"
msgstr "如果不能提供MFA验证码,请联系管理员!"
#: users/templates/users/reset_password.html:46
#: users/templates/users/reset_password.html:46
#: users/templates/users/user_detail.html:3
48
users/utils.py:80
#: users/templates/users/user_detail.html:3
52
users/utils.py:80
msgid "Reset password"
msgid "Reset password"
msgstr "重置密码"
msgstr "重置密码"
...
@@ -2671,63 +2677,63 @@ msgstr "强制启用"
...
@@ -2671,63 +2677,63 @@ msgstr "强制启用"
msgid "Disabled"
msgid "Disabled"
msgstr "禁用"
msgstr "禁用"
#: users/templates/users/user_detail.html:11
5
#: users/templates/users/user_detail.html:11
9
#: users/templates/users/user_profile.html:10
4
#: users/templates/users/user_profile.html:10
8
msgid "Last login"
msgid "Last login"
msgstr "最后登录"
msgstr "最后登录"
#: users/templates/users/user_detail.html:15
1
#: users/templates/users/user_detail.html:15
5
msgid "Force enabled MFA"
msgid "Force enabled MFA"
msgstr "强制启用MFA"
msgstr "强制启用MFA"
#: users/templates/users/user_detail.html:1
66
#: users/templates/users/user_detail.html:1
70
msgid "Send reset password mail"
msgid "Send reset password mail"
msgstr "发送重置密码邮件"
msgstr "发送重置密码邮件"
#: users/templates/users/user_detail.html:1
69
#: users/templates/users/user_detail.html:1
73
#: users/templates/users/user_detail.html:1
77
#: users/templates/users/user_detail.html:1
81
msgid "Send"
msgid "Send"
msgstr "发送"
msgstr "发送"
#: users/templates/users/user_detail.html:17
4
#: users/templates/users/user_detail.html:17
8
msgid "Send reset ssh key mail"
msgid "Send reset ssh key mail"
msgstr "发送重置密钥邮件"
msgstr "发送重置密钥邮件"
#: users/templates/users/user_detail.html:29
1
#: users/templates/users/user_detail.html:29
5
msgid "Goto profile page enable MFA"
msgid "Goto profile page enable MFA"
msgstr "请去个人信息页面启用自己的MFA"
msgstr "请去个人信息页面启用自己的MFA"
#: users/templates/users/user_detail.html:3
47
#: users/templates/users/user_detail.html:3
51
msgid "An e-mail has been sent to the user`s mailbox."
msgid "An e-mail has been sent to the user`s mailbox."
msgstr "已发送邮件到用户邮箱"
msgstr "已发送邮件到用户邮箱"
#: users/templates/users/user_detail.html:3
58
#: users/templates/users/user_detail.html:3
62
msgid "This will reset the user password and send a reset mail"
msgid "This will reset the user password and send a reset mail"
msgstr "将失效用户当前密码,并发送重设密码邮件到用户邮箱"
msgstr "将失效用户当前密码,并发送重设密码邮件到用户邮箱"
#: users/templates/users/user_detail.html:37
2
#: users/templates/users/user_detail.html:37
6
msgid ""
msgid ""
"The reset-ssh-public-key E-mail has been sent successfully. Please inform "
"The reset-ssh-public-key E-mail has been sent successfully. Please inform "
"the user to update his new ssh public key."
"the user to update his new ssh public key."
msgstr "重设密钥邮件将会发送到用户邮箱"
msgstr "重设密钥邮件将会发送到用户邮箱"
#: users/templates/users/user_detail.html:37
3
#: users/templates/users/user_detail.html:37
7
msgid "Reset SSH public key"
msgid "Reset SSH public key"
msgstr "重置SSH密钥"
msgstr "重置SSH密钥"
#: users/templates/users/user_detail.html:38
3
#: users/templates/users/user_detail.html:38
7
msgid "This will reset the user public key and send a reset mail"
msgid "This will reset the user public key and send a reset mail"
msgstr "将会失效用户当前密钥,并发送重置邮件到用户邮箱"
msgstr "将会失效用户当前密钥,并发送重置邮件到用户邮箱"
#: users/templates/users/user_detail.html:40
0
#: users/templates/users/user_detail.html:40
4
#: users/templates/users/user_profile.html:2
07
#: users/templates/users/user_profile.html:2
11
msgid "Successfully updated the SSH public key."
msgid "Successfully updated the SSH public key."
msgstr "更新ssh密钥成功"
msgstr "更新ssh密钥成功"
#: users/templates/users/user_detail.html:401
#: users/templates/users/user_detail.html:405
#: users/templates/users/user_detail.html:405
#: users/templates/users/user_profile.html:208
#: users/templates/users/user_detail.html:409
#: users/templates/users/user_profile.html:213
#: users/templates/users/user_profile.html:212
#: users/templates/users/user_profile.html:217
msgid "User SSH public key update"
msgid "User SSH public key update"
msgstr "ssh密钥"
msgstr "ssh密钥"
...
@@ -2766,20 +2772,20 @@ msgstr "用户组删除"
...
@@ -2766,20 +2772,20 @@ msgstr "用户组删除"
msgid "UserGroup Deleting failed."
msgid "UserGroup Deleting failed."
msgstr "用户组删除失败"
msgstr "用户组删除失败"
#: users/templates/users/user_list.html:19
5
#: users/templates/users/user_list.html:19
6
msgid "This will delete the selected users !!!"
msgid "This will delete the selected users !!!"
msgstr "删除选中用户 !!!"
msgstr "删除选中用户 !!!"
#: users/templates/users/user_list.html:20
3
#: users/templates/users/user_list.html:20
4
msgid "User Deleted."
msgid "User Deleted."
msgstr "已被删除"
msgstr "已被删除"
#: users/templates/users/user_list.html:20
4
#: users/templates/users/user_list.html:20
5
#: users/templates/users/user_list.html:2
09
#: users/templates/users/user_list.html:2
10
msgid "User Delete"
msgid "User Delete"
msgstr "删除"
msgstr "删除"
#: users/templates/users/user_list.html:20
8
#: users/templates/users/user_list.html:20
9
msgid "User Deleting failed."
msgid "User Deleting failed."
msgstr "用户删除失败"
msgstr "用户删除失败"
...
@@ -2787,28 +2793,28 @@ msgstr "用户删除失败"
...
@@ -2787,28 +2793,28 @@ msgstr "用户删除失败"
msgid "Administrator Settings force MFA login"
msgid "Administrator Settings force MFA login"
msgstr "管理员设置强制使用MFA登录"
msgstr "管理员设置强制使用MFA登录"
#: users/templates/users/user_profile.html:11
2
users/views/user.py:203
#: users/templates/users/user_profile.html:11
6
users/views/user.py:203
#: users/views/user.py:257
#: users/views/user.py:257
msgid "User groups"
msgid "User groups"
msgstr "用户组"
msgstr "用户组"
#: users/templates/users/user_profile.html:14
4
#: users/templates/users/user_profile.html:14
8
msgid "Update password"
msgid "Update password"
msgstr "更改密码"
msgstr "更改密码"
#: users/templates/users/user_profile.html:15
2
#: users/templates/users/user_profile.html:15
6
msgid "Update MFA settings"
msgid "Update MFA settings"
msgstr "更改MFA设置"
msgstr "更改MFA设置"
#: users/templates/users/user_profile.html:17
3
#: users/templates/users/user_profile.html:17
7
msgid "Update SSH public key"
msgid "Update SSH public key"
msgstr "更改SSH密钥"
msgstr "更改SSH密钥"
#: users/templates/users/user_profile.html:18
1
#: users/templates/users/user_profile.html:18
5
msgid "Reset public key and download"
msgid "Reset public key and download"
msgstr "重置并下载SSH密钥"
msgstr "重置并下载SSH密钥"
#: users/templates/users/user_profile.html:21
1
#: users/templates/users/user_profile.html:21
5
msgid "Failed to update SSH public key."
msgid "Failed to update SSH public key."
msgstr "更新密钥失败"
msgstr "更新密钥失败"
...
@@ -2986,56 +2992,56 @@ msgstr "用户组授权资产"
...
@@ -2986,56 +2992,56 @@ msgstr "用户组授权资产"
msgid "Please enable cookies and try again."
msgid "Please enable cookies and try again."
msgstr "设置你的浏览器支持cookie"
msgstr "设置你的浏览器支持cookie"
#: users/views/login.py:1
35 users/views/user.py:499 users/views/user.py:524
#: users/views/login.py:1
28 users/views/user.py:498 users/views/user.py:523
msgid "MFA code invalid"
msgid "MFA code invalid"
msgstr "MFA码认证失败"
msgstr "MFA码认证失败"
#: users/views/login.py:1
61
#: users/views/login.py:1
54
msgid "Logout success"
msgid "Logout success"
msgstr "退出登录成功"
msgstr "退出登录成功"
#: users/views/login.py:1
62
#: users/views/login.py:1
55
msgid "Logout success, return login page"
msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面"
msgstr "退出登录成功,返回到登录页面"
#: users/views/login.py:17
8
#: users/views/login.py:17
1
msgid "Email address invalid, please input again"
msgid "Email address invalid, please input again"
msgstr "邮箱地址错误,重新输入"
msgstr "邮箱地址错误,重新输入"
#: users/views/login.py:1
91
#: users/views/login.py:1
84
msgid "Send reset password message"
msgid "Send reset password message"
msgstr "发送重置密码邮件"
msgstr "发送重置密码邮件"
#: users/views/login.py:1
92
#: users/views/login.py:1
85
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:
205
#: users/views/login.py:
198
msgid "Reset password success"
msgid "Reset password success"
msgstr "重置密码成功"
msgstr "重置密码成功"
#: users/views/login.py:
206
#: users/views/login.py:
199
msgid "Reset password success, return to login page"
msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面"
msgstr "重置密码成功,返回到登录页面"
#: users/views/login.py:22
7 users/views/login.py:240
#: users/views/login.py:22
0 users/views/login.py:233
msgid "Token invalid or expired"
msgid "Token invalid or expired"
msgstr "Token错误或失效"
msgstr "Token错误或失效"
#: users/views/login.py:2
36
#: users/views/login.py:2
29
msgid "Password not same"
msgid "Password not same"
msgstr "密码不一致"
msgstr "密码不一致"
#: users/views/login.py:2
46 users/views/user.py:115 users/views/user.py:397
#: users/views/login.py:2
39 users/views/user.py:115 users/views/user.py:396
msgid "* Your password does not meet the requirements"
msgid "* Your password does not meet the requirements"
msgstr "* 您的密码不符合要求"
msgstr "* 您的密码不符合要求"
#: users/views/login.py:2
84
#: users/views/login.py:2
77
msgid "First login"
msgid "First login"
msgstr "首次登陆"
msgstr "首次登陆"
#: users/views/login.py:3
43
#: users/views/login.py:3
36
msgid "Login log list"
msgid "Login log list"
msgstr "登录日志"
msgstr "登录日志"
...
@@ -3051,34 +3057,34 @@ msgstr "文件不合法"
...
@@ -3051,34 +3057,34 @@ msgstr "文件不合法"
msgid "User granted assets"
msgid "User granted assets"
msgstr "用户授权资产"
msgstr "用户授权资产"
#: users/views/user.py:36
1
#: users/views/user.py:36
0
msgid "Profile setting"
msgid "Profile setting"
msgstr "个人信息设置"
msgstr "个人信息设置"
#: users/views/user.py:3
80
#: users/views/user.py:3
79
msgid "Password update"
msgid "Password update"
msgstr "密码更新"
msgstr "密码更新"
#: users/views/user.py:41
5
#: users/views/user.py:41
4
msgid "Public key update"
msgid "Public key update"
msgstr "密钥更新"
msgstr "密钥更新"
#: users/views/user.py:45
6
#: users/views/user.py:45
5
msgid "Password invalid"
msgid "Password invalid"
msgstr "用户名或密码无效"
msgstr "用户名或密码无效"
#: users/views/user.py:5
50
#: users/views/user.py:5
49
msgid "MFA enable success"
msgid "MFA enable success"
msgstr "MFA 绑定成功"
msgstr "MFA 绑定成功"
#: users/views/user.py:55
1
#: users/views/user.py:55
0
msgid "MFA enable success, return login page"
msgid "MFA enable success, return login page"
msgstr "MFA 绑定成功,返回到登录页面"
msgstr "MFA 绑定成功,返回到登录页面"
#: users/views/user.py:55
3
#: users/views/user.py:55
2
msgid "MFA disable success"
msgid "MFA disable success"
msgstr "MFA 解绑成功"
msgstr "MFA 解绑成功"
#: users/views/user.py:55
4
#: users/views/user.py:55
3
msgid "MFA disable success, return login page"
msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面"
msgstr "MFA 解绑成功,返回登录页面"
apps/users/models/user.py
View file @
64db02c3
...
@@ -36,6 +36,12 @@ class User(AbstractUser):
...
@@ -36,6 +36,12 @@ class User(AbstractUser):
(
1
,
_
(
'Enable'
)),
(
1
,
_
(
'Enable'
)),
(
2
,
_
(
"Force enable"
)),
(
2
,
_
(
"Force enable"
)),
)
)
SOURCE_LOCAL
=
'local'
SOURCE_LDAP
=
'ldap'
SOURCE_CHOICES
=
(
(
SOURCE_LOCAL
,
'Local'
),
(
SOURCE_LDAP
,
'LDAP/AD'
),
)
id
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
)
id
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
primary_key
=
True
)
username
=
models
.
CharField
(
username
=
models
.
CharField
(
max_length
=
128
,
unique
=
True
,
verbose_name
=
_
(
'Username'
)
max_length
=
128
,
unique
=
True
,
verbose_name
=
_
(
'Username'
)
...
@@ -83,6 +89,10 @@ class User(AbstractUser):
...
@@ -83,6 +89,10 @@ class User(AbstractUser):
created_by
=
models
.
CharField
(
created_by
=
models
.
CharField
(
max_length
=
30
,
default
=
''
,
verbose_name
=
_
(
'Created by'
)
max_length
=
30
,
default
=
''
,
verbose_name
=
_
(
'Created by'
)
)
)
source
=
models
.
CharField
(
max_length
=
30
,
default
=
SOURCE_LOCAL
,
choices
=
SOURCE_CHOICES
,
verbose_name
=
_
(
'Source'
)
)
def
__str__
(
self
):
def
__str__
(
self
):
return
'{0.name}({0.username})'
.
format
(
self
)
return
'{0.name}({0.username})'
.
format
(
self
)
...
@@ -259,7 +269,7 @@ class User(AbstractUser):
...
@@ -259,7 +269,7 @@ class User(AbstractUser):
return
self
.
otp_level
==
2
return
self
.
otp_level
==
2
def
enable_otp
(
self
):
def
enable_otp
(
self
):
if
not
self
.
otp_
force_enabled
:
if
not
self
.
otp_
level
==
2
:
self
.
otp_level
=
1
self
.
otp_level
=
1
def
force_enable_otp
(
self
):
def
force_enable_otp
(
self
):
...
@@ -279,6 +289,7 @@ class User(AbstractUser):
...
@@ -279,6 +289,7 @@ class User(AbstractUser):
'is_superuser'
:
self
.
is_superuser
,
'is_superuser'
:
self
.
is_superuser
,
'role'
:
self
.
get_role_display
(),
'role'
:
self
.
get_role_display
(),
'groups'
:
[
group
.
name
for
group
in
self
.
groups
.
all
()],
'groups'
:
[
group
.
name
for
group
in
self
.
groups
.
all
()],
'source'
:
self
.
get_source_display
(),
'wechat'
:
self
.
wechat
,
'wechat'
:
self
.
wechat
,
'phone'
:
self
.
phone
,
'phone'
:
self
.
phone
,
'otp_level'
:
self
.
otp_level
,
'otp_level'
:
self
.
otp_level
,
...
...
apps/users/serializers.py
View file @
64db02c3
...
@@ -26,7 +26,10 @@ class UserSerializer(BulkSerializerMixin, serializers.ModelSerializer):
...
@@ -26,7 +26,10 @@ class UserSerializer(BulkSerializerMixin, serializers.ModelSerializer):
def
get_field_names
(
self
,
declared_fields
,
info
):
def
get_field_names
(
self
,
declared_fields
,
info
):
fields
=
super
(
UserSerializer
,
self
)
.
get_field_names
(
declared_fields
,
info
)
fields
=
super
(
UserSerializer
,
self
)
.
get_field_names
(
declared_fields
,
info
)
fields
.
extend
([
'groups_display'
,
'get_role_display'
,
'is_valid'
])
fields
.
extend
([
'groups_display'
,
'get_role_display'
,
'get_source_display'
,
'is_valid'
])
return
fields
return
fields
@staticmethod
@staticmethod
...
...
apps/users/signals_handler.py
View file @
64db02c3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#
#
from
django.dispatch
import
receiver
from
django.dispatch
import
receiver
from
django_auth_ldap.backend
import
populate_user
# from django.db.models.signals import post_save
# from django.db.models.signals import post_save
from
common.utils
import
get_logger
from
common.utils
import
get_logger
...
@@ -28,3 +29,11 @@ def on_user_create(sender, user=None, **kwargs):
...
@@ -28,3 +29,11 @@ def on_user_create(sender, user=None, **kwargs):
logger
.
info
(
" - Sending welcome mail ..."
.
format
(
user
.
name
))
logger
.
info
(
" - Sending welcome mail ..."
.
format
(
user
.
name
))
if
user
.
email
:
if
user
.
email
:
send_user_created_mail
(
user
)
send_user_created_mail
(
user
)
@receiver
(
populate_user
)
def
on_ldap_create_user
(
sender
,
user
,
ldap_user
,
**
kwargs
):
if
user
:
user
.
source
=
user
.
SOURCE_LDAP
user
.
save
()
apps/users/templates/users/user_detail.html
View file @
64db02c3
...
@@ -99,6 +99,10 @@
...
@@ -99,6 +99,10 @@
{% endif %}
{% endif %}
</b></td>
</b></td>
</tr>
</tr>
<tr>
<td>
{% trans 'Source' %}:
</td>
<td><b>
{{ user_object.get_source_display }}
</b></td>
</tr>
<tr>
<tr>
<td>
{% trans 'Date expired' %}:
</td>
<td>
{% trans 'Date expired' %}:
</td>
<td><b>
{{ user_object.date_expired|date:"Y-m-j H:i:s" }}
</b></td>
<td><b>
{{ user_object.date_expired|date:"Y-m-j H:i:s" }}
</b></td>
...
...
apps/users/templates/users/user_list.html
View file @
64db02c3
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
<th
class=
"text-center"
>
{% trans 'Username' %}
</th>
<th
class=
"text-center"
>
{% trans 'Username' %}
</th>
<th
class=
"text-center"
>
{% trans 'Role' %}
</th>
<th
class=
"text-center"
>
{% trans 'Role' %}
</th>
<th
class=
"text-center"
>
{% trans 'User group' %}
</th>
<th
class=
"text-center"
>
{% trans 'User group' %}
</th>
<th
class=
"text-center"
>
{% trans 'Source' %}
</th>
<th
class=
"text-center"
>
{% trans 'Active' %}
</th>
<th
class=
"text-center"
>
{% trans 'Active' %}
</th>
<th
class=
"text-center"
>
{% trans 'Action' %}
</th>
<th
class=
"text-center"
>
{% trans 'Action' %}
</th>
</tr>
</tr>
...
@@ -65,14 +66,14 @@ function initTable() {
...
@@ -65,14 +66,14 @@ function initTable() {
var
innerHtml
=
cellData
.
length
>
20
?
cellData
.
substring
(
0
,
20
)
+
'...'
:
cellData
;
var
innerHtml
=
cellData
.
length
>
20
?
cellData
.
substring
(
0
,
20
)
+
'...'
:
cellData
;
$
(
td
).
html
(
'<span href="javascript:void(0);" data-toggle="tooltip" title="'
+
cellData
+
'">'
+
innerHtml
+
'</span>'
);
$
(
td
).
html
(
'<span href="javascript:void(0);" data-toggle="tooltip" title="'
+
cellData
+
'">'
+
innerHtml
+
'</span>'
);
}},
}},
{
targets
:
5
,
createdCell
:
function
(
td
,
cellData
)
{
{
targets
:
6
,
createdCell
:
function
(
td
,
cellData
)
{
if
(
!
cellData
)
{
if
(
!
cellData
)
{
$
(
td
).
html
(
'<i class="fa fa-times text-danger"></i>'
)
$
(
td
).
html
(
'<i class="fa fa-times text-danger"></i>'
)
}
else
{
}
else
{
$
(
td
).
html
(
'<i class="fa fa-check text-navy"></i>'
)
$
(
td
).
html
(
'<i class="fa fa-check text-navy"></i>'
)
}
}
}},
}},
{
targets
:
6
,
createdCell
:
function
(
td
,
cellData
,
rowData
)
{
{
targets
:
7
,
createdCell
:
function
(
td
,
cellData
,
rowData
)
{
var
update_btn
=
'<a href="{% url "users:user-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>'
.
replace
(
'00000000-0000-0000-0000-000000000000'
,
cellData
);
var
update_btn
=
'<a href="{% url "users:user-update" pk=DEFAULT_PK %}" class="btn btn-xs btn-info">{% trans "Update" %}</a>'
.
replace
(
'00000000-0000-0000-0000-000000000000'
,
cellData
);
var
del_btn
=
""
;
var
del_btn
=
""
;
...
@@ -90,7 +91,7 @@ function initTable() {
...
@@ -90,7 +91,7 @@ function initTable() {
ajax_url
:
'{% url "api-users:user-list" %}'
,
ajax_url
:
'{% url "api-users:user-list" %}'
,
columns
:
[
columns
:
[
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"username"
},
{
data
:
"get_role_display"
},
{
data
:
"id"
},
{
data
:
"name"
},
{
data
:
"username"
},
{
data
:
"get_role_display"
},
{
data
:
"groups_display"
},
{
data
:
"is_valid"
},
{
data
:
"id"
}
{
data
:
"groups_display"
},
{
data
:
"
get_source_display"
},
{
data
:
"
is_valid"
},
{
data
:
"id"
}
],
],
op_html
:
$
(
'#actions'
).
html
()
op_html
:
$
(
'#actions'
).
html
()
};
};
...
...
apps/users/templates/users/user_profile.html
View file @
64db02c3
...
@@ -96,6 +96,10 @@
...
@@ -96,6 +96,10 @@
{% endif %}
{% endif %}
</td>
</td>
</tr>
</tr>
<tr>
<td
class=
"text-navy"
>
{% trans 'Source' %}
</td>
<td>
{{ user.get_source_display }}
</td>
</tr>
<tr>
<tr>
<td
class=
"text-navy"
>
{% trans 'Date joined' %}
</td>
<td
class=
"text-navy"
>
{% trans 'Date joined' %}
</td>
<td>
{{ user.date_joined|date:"Y-m-d H:i:s" }}
</td>
<td>
{{ user.date_joined|date:"Y-m-d H:i:s" }}
</td>
...
...
apps/users/views/login.py
View file @
64db02c3
...
@@ -83,10 +83,10 @@ class UserLoginView(FormView):
...
@@ -83,10 +83,10 @@ class UserLoginView(FormView):
user
=
get_user_or_tmp_user
(
self
.
request
)
user
=
get_user_or_tmp_user
(
self
.
request
)
if
user
.
otp_enabled
and
user
.
otp_secret_key
:
if
user
.
otp_enabled
and
user
.
otp_secret_key
:
# 1,2 & T
# 1,2
,mfa_setting
& T
return
reverse
(
'users:login-otp'
)
return
reverse
(
'users:login-otp'
)
elif
user
.
otp_enabled
and
not
user
.
otp_secret_key
:
elif
user
.
otp_enabled
and
not
user
.
otp_secret_key
:
# 1,2 & F
# 1,2
,mfa_setting
& F
return
reverse
(
'users:user-otp-enable-authentication'
)
return
reverse
(
'users:user-otp-enable-authentication'
)
elif
not
user
.
otp_enabled
:
elif
not
user
.
otp_enabled
:
# 0 & T,F
# 0 & T,F
...
...
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