Commit ce8f4b4a authored by 八千流's avatar 八千流 Committed by 老广

Ldap synchronization (#2512)

* [Add]初步实现ldap一键导入用户到jumpserver用户表里

* [update]增加定时延迟一秒刷新页面

* [Update]更改前端以表格形式显示用户信息,优化代码结构

* [Update]增加用户显示表格

* [Update]settings配置文件取消注释

* [Update]优化ldap同步用功能代码

* [Update]删除ldap同步用户旧html模版

* [Update]修改登录页面图片拉伸问题

* [Update]增加 是否已经导入,在前端提示用户

* [Update]优化ldap同步用户的代码,以及翻译

* [Update] 更新翻译(改密计划) (#2525)

* [Update] 更新翻译(添加改密计划)

* [Update] 更新翻译(改密计划)

* [Update] 更新翻译

* [Update] 更新翻译

* Export login log (#2511)

* [Add]增加登录日志导出功能

* [Update]优化导出登录日志代码

* [Update]优化导出登录日志代码

* [Update]更改导出登录日志按钮
parent 9aae1069
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-22 00:30+0800\n"
"POT-Creation-Date: 2019-03-22 15:34+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"
......@@ -33,7 +33,6 @@ msgstr "测试节点下资产是否可连接: {}"
#: assets/templates/assets/asset_detail.html:194
#: assets/templates/assets/asset_detail.html:202
#: assets/templates/assets/system_user_asset.html:95 perms/models.py:31
#: xpack/plugins/change_auth_plan/models.py:67
msgid "Nodes"
msgstr "节点管理"
......@@ -73,9 +72,6 @@ msgstr "网域"
#: perms/templates/perms/asset_permission_list.html:57
#: perms/templates/perms/asset_permission_list.html:78
#: perms/templates/perms/asset_permission_list.html:128
#: xpack/plugins/change_auth_plan/forms.py:36
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_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:63
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_instance.html:66
......@@ -102,8 +98,6 @@ msgstr "如果有多个的互相隔离的网络,设置资产属于的网域,
#: assets/forms/asset.py:92 assets/forms/asset.py:96 assets/forms/domain.py:17
#: assets/forms/label.py:15
#: perms/templates/perms/asset_permission_asset.html:88
#: xpack/plugins/change_auth_plan/forms.py:32
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:84
msgid "Select assets"
msgstr "选择资产"
......@@ -113,7 +107,7 @@ msgstr "选择资产"
#: assets/templates/assets/domain_detail.html:60
#: assets/templates/assets/domain_list.html:26
#: assets/templates/assets/label_list.html:16
#: assets/templates/assets/system_user_list.html:33 audits/models.py:18
#: assets/templates/assets/system_user_list.html:33 audits/models.py:19
#: audits/templates/audits/ftp_log_list.html:41
#: audits/templates/audits/ftp_log_list.html:71 perms/forms.py:42
#: perms/models.py:30
......@@ -125,13 +119,6 @@ msgstr "选择资产"
#: terminal/templates/terminal/command_list.html:73
#: terminal/templates/terminal/session_list.html:41
#: terminal/templates/terminal/session_list.html:72
#: xpack/plugins/change_auth_plan/forms.py:30
#: xpack/plugins/change_auth_plan/models.py:63
#: xpack/plugins/change_auth_plan/models.py:417
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:40
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_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:65
#: xpack/plugins/orgs/templates/orgs/org_list.html:16
......@@ -166,6 +153,7 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC"
#: perms/templates/perms/asset_permission_list.html:53
#: perms/templates/perms/asset_permission_list.html:72
#: perms/templates/perms/asset_permission_user.html:54 settings/models.py:29
#: settings/templates/settings/_ldap_list_users_modal.html:35
#: settings/templates/settings/command_storage_create.html:41
#: settings/templates/settings/replay_storage_create.html:44
#: settings/templates/settings/terminal_setting.html:80
......@@ -179,10 +167,6 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC"
#: users/templates/users/user_list.html:23
#: users/templates/users/user_profile.html:51
#: users/templates/users/user_pubkey_update.html:53
#: xpack/plugins/change_auth_plan/forms.py:102
#: xpack/plugins/change_auth_plan/models.py:56
#: 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:52
#: xpack/plugins/cloud/templates/cloud/account_list.html:12
......@@ -201,17 +185,16 @@ msgstr "名称"
#: assets/templates/assets/asset_asset_user_list.html:48
#: assets/templates/assets/domain_gateway_list.html:71
#: assets/templates/assets/system_user_detail.html:62
#: assets/templates/assets/system_user_list.html:30 audits/models.py:93
#: audits/templates/audits/login_log_list.html:49 authentication/forms.py:11
#: assets/templates/assets/system_user_list.html:30 audits/models.py:94
#: audits/templates/audits/login_log_list.html:51 authentication/forms.py:11
#: ops/models/adhoc.py:164 perms/templates/perms/asset_permission_list.html:74
#: perms/templates/perms/asset_permission_user.html:55 users/forms.py:13
#: perms/templates/perms/asset_permission_user.html:55
#: settings/templates/settings/_ldap_list_users_modal.html:34 users/forms.py:13
#: users/models/user.py:52 users/templates/users/_select_user_modal.html:14
#: users/templates/users/login.html:64 users/templates/users/new_login.html:85
#: users/templates/users/login.html:64 users/templates/users/new_login.html:110
#: users/templates/users/user_detail.html:67
#: users/templates/users/user_list.html:24
#: users/templates/users/user_profile.html:47
#: xpack/plugins/change_auth_plan/forms.py:103
#: xpack/plugins/change_auth_plan/models.py:414
msgid "Username"
msgstr "用户名"
......@@ -224,7 +207,7 @@ msgstr "密码或密钥密码"
#: assets/templates/assets/_asset_user_auth_modal.html:21
#: authentication/forms.py:13 settings/forms.py:103 users/forms.py:15
#: users/forms.py:27 users/templates/users/login.html:67
#: users/templates/users/new_login.html:90
#: users/templates/users/new_login.html:113
#: users/templates/users/reset_password.html:53
#: users/templates/users/user_create.html:10
#: users/templates/users/user_password_authentication.html:18
......@@ -232,15 +215,11 @@ msgstr "密码或密钥密码"
#: users/templates/users/user_profile_update.html:40
#: users/templates/users/user_pubkey_update.html:40
#: users/templates/users/user_update.html:20
#: xpack/plugins/change_auth_plan/forms.py:23
#: xpack/plugins/change_auth_plan/models.py:86
#: xpack/plugins/change_auth_plan/models.py:326
#: xpack/plugins/change_auth_plan/serializers.py:19
msgid "Password"
msgstr "密码"
#: assets/forms/user.py:29 assets/serializers/asset_user.py:27
#: users/models/user.py:81 xpack/plugins/change_auth_plan/serializers.py:27
#: users/models/user.py:81
msgid "Private key"
msgstr "ssh私钥"
......@@ -293,11 +272,10 @@ msgstr "使用逗号分隔多个命令,如: /bin/whoami,/sbin/ifconfig"
#: assets/templates/assets/system_user_asset.html:51
#: assets/templates/assets/user_asset_list.html:45
#: assets/templates/assets/user_asset_list.html:163
#: audits/templates/audits/login_log_list.html:52
#: audits/templates/audits/login_log_list.html:54
#: perms/templates/perms/asset_permission_asset.html:55 settings/forms.py:133
#: users/templates/users/user_granted_asset.html:45
#: users/templates/users/user_group_granted_asset.html:45
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:51
msgid "IP"
msgstr "IP"
......@@ -313,7 +291,6 @@ msgstr "IP"
#: perms/templates/perms/asset_permission_list.html:77 settings/forms.py:132
#: users/templates/users/user_granted_asset.html:44
#: users/templates/users/user_group_granted_asset.html:44
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:50
msgid "Hostname"
msgstr "主机名"
......@@ -432,8 +409,6 @@ msgstr "标签管理"
#: ops/templates/ops/adhoc_detail.html:86 orgs/models.py:15 perms/models.py:36
#: perms/models.py:89 perms/templates/perms/asset_permission_detail.html:98
#: users/models/user.py:95 users/templates/users/user_detail.html:111
#: xpack/plugins/change_auth_plan/models.py:99
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:113
#: xpack/plugins/cloud/models.py:55 xpack/plugins/cloud/models.py:127
msgid "Created by"
msgstr "创建者"
......@@ -449,7 +424,6 @@ msgstr "创建者"
#: perms/templates/perms/asset_permission_detail.html:94
#: terminal/templates/terminal/terminal_detail.html:59 users/models/group.py:17
#: 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:68
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:79
......@@ -480,11 +454,8 @@ msgstr "创建日期"
#: users/templates/users/user_detail.html:127
#: users/templates/users/user_group_detail.html:67
#: users/templates/users/user_group_list.html:14
#: users/templates/users/user_profile.html:134
#: xpack/plugins/change_auth_plan/models.py:95
#: 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
#: users/templates/users/user_profile.html:134 xpack/plugins/cloud/models.py:54
#: xpack/plugins/cloud/models.py:125
#: xpack/plugins/cloud/templates/cloud/account_detail.html:72
#: xpack/plugins/cloud/templates/cloud/account_list.html:15
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:71
......@@ -532,13 +503,11 @@ msgstr "版本"
msgid "AuthBook"
msgstr ""
#: assets/models/base.py:29 xpack/plugins/change_auth_plan/models.py:90
#: xpack/plugins/change_auth_plan/models.py:330
#: assets/models/base.py:29
msgid "SSH private key"
msgstr "ssh密钥"
#: assets/models/base.py:30 xpack/plugins/change_auth_plan/models.py:93
#: xpack/plugins/change_auth_plan/models.py:333
#: assets/models/base.py:30
msgid "SSH public key"
msgstr "ssh公钥"
......@@ -627,7 +596,7 @@ msgstr "过滤器"
#: assets/models/cmd_filter.py:50
#: assets/templates/assets/cmd_filter_rule_list.html:58
#: audits/templates/audits/login_log_list.html:50
#: audits/templates/audits/login_log_list.html:52
#: settings/templates/settings/command_storage_create.html:31
#: settings/templates/settings/replay_storage_create.html:31
#: settings/templates/settings/terminal_setting.html:81
......@@ -666,7 +635,7 @@ msgstr "每行一个命令"
#: assets/templates/assets/label_list.html:17
#: assets/templates/assets/system_user_asset.html:54
#: assets/templates/assets/system_user_list.html:38
#: assets/templates/assets/user_asset_list.html:48 audits/models.py:37
#: assets/templates/assets/user_asset_list.html:48 audits/models.py:38
#: audits/templates/audits/operate_log_list.html:41
#: audits/templates/audits/operate_log_list.html:67
#: ops/templates/ops/adhoc_history.html:59 ops/templates/ops/task_adhoc.html:64
......@@ -678,9 +647,6 @@ msgstr "每行一个命令"
#: terminal/templates/terminal/terminal_list.html:36
#: users/templates/users/user_group_list.html:15
#: users/templates/users/user_list.html:29
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:60
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:18
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:20
#: xpack/plugins/cloud/templates/cloud/account_list.html:16
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:18
#: xpack/plugins/orgs/templates/orgs/org_list.html:23
......@@ -706,8 +672,8 @@ msgstr "资产组"
msgid "Default asset group"
msgstr "默认资产组"
#: assets/models/label.py:15 audits/models.py:16 audits/models.py:36
#: audits/models.py:49 audits/templates/audits/ftp_log_list.html:33
#: assets/models/label.py:15 audits/models.py:17 audits/models.py:37
#: audits/models.py:50 audits/templates/audits/ftp_log_list.html:33
#: audits/templates/audits/ftp_log_list.html:70
#: audits/templates/audits/operate_log_list.html:33
#: audits/templates/audits/operate_log_list.html:66
......@@ -801,7 +767,7 @@ msgid "Login mode"
msgstr "登录模式"
#: assets/models/user.py:247 assets/templates/assets/user_asset_list.html:168
#: audits/models.py:19 audits/templates/audits/ftp_log_list.html:49
#: audits/models.py:20 audits/templates/audits/ftp_log_list.html:49
#: audits/templates/audits/ftp_log_list.html:72 perms/forms.py:48
#: perms/models.py:32 perms/models.py:86
#: perms/templates/perms/asset_permission_detail.html:140
......@@ -828,7 +794,6 @@ msgstr "%(value)s is not an even number"
#: users/templates/users/user_profile.html:68
#: users/templates/users/user_profile_update.html:43
#: users/templates/users/user_pubkey_update.html:43
#: xpack/plugins/change_auth_plan/serializers.py:23
msgid "Public key"
msgstr "ssh公钥"
......@@ -981,7 +946,6 @@ msgstr "如果使用了nat端口映射,请设置为ssh真实监听的端口"
#: assets/templates/assets/asset_update.html:21
#: assets/templates/assets/gateway_create_update.html:37
#: perms/templates/perms/asset_permission_create_update.html:38
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:37
msgid "Basic"
msgstr "基本"
......@@ -1003,7 +967,6 @@ msgstr "自动生成密钥"
#: assets/templates/assets/gateway_create_update.html:53
#: perms/templates/perms/asset_permission_create_update.html:50
#: terminal/templates/terminal/terminal_update.html:40
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:61
msgid "Other"
msgstr "其它"
......@@ -1034,7 +997,6 @@ msgstr "其它"
#: users/templates/users/user_profile_update.html:63
#: users/templates/users/user_pubkey_update.html:70
#: users/templates/users/user_pubkey_update.html:76
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:65
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create.html:35
#: xpack/plugins/interface/templates/interface/interface.html:88
......@@ -1052,6 +1014,7 @@ msgstr "重置"
#: assets/templates/assets/domain_create_update.html:17
#: assets/templates/assets/gateway_create_update.html:59
#: assets/templates/assets/label_create_update.html:19
#: audits/templates/audits/login_log_list.html:89
#: perms/templates/perms/asset_permission_create_update.html:81
#: settings/templates/settings/basic_setting.html:62
#: settings/templates/settings/command_storage_create.html:80
......@@ -1070,7 +1033,6 @@ msgstr "重置"
#: users/templates/users/user_password_update.html:72
#: users/templates/users/user_profile_update.html:64
#: users/templates/users/user_pubkey_update.html:77
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:66
#: xpack/plugins/interface/templates/interface/interface.html:89
msgid "Submit"
msgstr "提交"
......@@ -1100,7 +1062,6 @@ msgstr "关闭"
#: perms/templates/perms/asset_permission_asset.html:18
#: perms/templates/perms/asset_permission_detail.html:18
#: perms/templates/perms/asset_permission_user.html:18
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:106
msgid "Detail"
msgstr "详情"
......@@ -1111,7 +1072,6 @@ msgstr "资产列表"
#: assets/templates/assets/admin_user_assets.html:29
#: perms/templates/perms/asset_permission_asset.html:35
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:31
msgid "Asset list of "
msgstr "资产列表"
......@@ -1174,7 +1134,7 @@ msgstr "更新失败"
#: assets/templates/assets/domain_list.html:53
#: assets/templates/assets/label_list.html:38
#: assets/templates/assets/system_user_detail.html:26
#: assets/templates/assets/system_user_list.html:92 audits/models.py:32
#: assets/templates/assets/system_user_list.html:92 audits/models.py:33
#: perms/templates/perms/asset_permission_detail.html:30
#: perms/templates/perms/asset_permission_list.html:177
#: terminal/templates/terminal/terminal_detail.html:16
......@@ -1186,8 +1146,6 @@ msgstr "更新失败"
#: users/templates/users/user_profile.html:177
#: 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:54
#: xpack/plugins/cloud/templates/cloud/account_detail.html:25
#: xpack/plugins/cloud/templates/cloud/account_list.html:38
#: xpack/plugins/orgs/templates/orgs/org_detail.html:25
......@@ -1208,7 +1166,7 @@ msgstr "更新"
#: assets/templates/assets/domain_list.html:54
#: assets/templates/assets/label_list.html:39
#: assets/templates/assets/system_user_detail.html:30
#: assets/templates/assets/system_user_list.html:93 audits/models.py:33
#: assets/templates/assets/system_user_list.html:93 audits/models.py:34
#: ops/templates/ops/task_list.html:64
#: perms/templates/perms/asset_permission_detail.html:34
#: perms/templates/perms/asset_permission_list.html:178
......@@ -1220,8 +1178,6 @@ msgstr "更新"
#: users/templates/users/user_group_list.html:45
#: users/templates/users/user_list.html:84
#: users/templates/users/user_list.html:88
#: 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:56
#: xpack/plugins/cloud/templates/cloud/account_detail.html:29
#: xpack/plugins/cloud/templates/cloud/account_list.html:40
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_detail.html:32
......@@ -1237,8 +1193,6 @@ msgstr "替换资产的管理员"
#: assets/templates/assets/admin_user_detail.html:91
#: perms/templates/perms/asset_permission_asset.html:116
#: xpack/plugins/change_auth_plan/forms.py:38
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:112
msgid "Select nodes"
msgstr "选择节点"
......@@ -1305,7 +1259,6 @@ msgstr "资产用户"
#: assets/templates/assets/asset_asset_user_list.html:51
#: assets/templates/assets/cmd_filter_detail.html:73
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:109
msgid "Date updated"
msgstr "更新日期"
......@@ -1314,7 +1267,6 @@ msgstr "更新日期"
#: terminal/templates/terminal/session_detail.html:81
#: users/templates/users/user_detail.html:138
#: users/templates/users/user_profile.html:146
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:128
#: xpack/plugins/license/templates/license/license_detail.html:93
msgid "Quick modify"
msgstr "快速修改"
......@@ -1826,7 +1778,7 @@ msgstr "资产管理"
msgid "System user asset"
msgstr "系统用户资产"
#: audits/models.py:17 audits/models.py:40 audits/models.py:51
#: audits/models.py:18 audits/models.py:41 audits/models.py:52
#: audits/templates/audits/ftp_log_list.html:73
#: audits/templates/audits/operate_log_list.html:70
#: audits/templates/audits/password_change_log_list.html:52
......@@ -1835,114 +1787,110 @@ msgstr "系统用户资产"
msgid "Remote addr"
msgstr "远端地址"
#: audits/models.py:20 audits/templates/audits/ftp_log_list.html:74
#: audits/models.py:21 audits/templates/audits/ftp_log_list.html:74
msgid "Operate"
msgstr "操作"
#: audits/models.py:21 audits/templates/audits/ftp_log_list.html:56
#: audits/models.py:22 audits/templates/audits/ftp_log_list.html:56
#: audits/templates/audits/ftp_log_list.html:75
msgid "Filename"
msgstr "文件名"
#: audits/models.py:22 audits/models.py:89
#: audits/models.py:23 audits/models.py:90
#: audits/templates/audits/ftp_log_list.html:76
#: ops/templates/ops/command_execution_list.html:64
#: ops/templates/ops/task_list.html:31
#: users/templates/users/user_detail.html:458
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:14
#: xpack/plugins/cloud/api.py:62
#: users/templates/users/user_detail.html:458 xpack/plugins/cloud/api.py:62
msgid "Success"
msgstr "成功"
#: audits/models.py:31
#: audits/models.py:32
msgid "Create"
msgstr "创建"
#: audits/models.py:38 audits/templates/audits/operate_log_list.html:49
#: audits/models.py:39 audits/templates/audits/operate_log_list.html:49
#: audits/templates/audits/operate_log_list.html:68
msgid "Resource Type"
msgstr "资源类型"
#: audits/models.py:39 audits/templates/audits/operate_log_list.html:69
#: audits/models.py:40 audits/templates/audits/operate_log_list.html:69
msgid "Resource"
msgstr "资源"
#: audits/models.py:50 audits/templates/audits/password_change_log_list.html:51
#: audits/models.py:51 audits/templates/audits/password_change_log_list.html:51
msgid "Change by"
msgstr "修改者"
#: audits/models.py:69 users/templates/users/user_detail.html:98
#: audits/models.py:70 users/templates/users/user_detail.html:98
msgid "Disabled"
msgstr "禁用"
#: audits/models.py:70 settings/models.py:33
#: audits/models.py:71 settings/models.py:33
#: users/templates/users/user_detail.html:96
msgid "Enabled"
msgstr "启用"
#: audits/models.py:71 audits/models.py:81
#: audits/models.py:72 audits/models.py:82
msgid "-"
msgstr ""
#: audits/models.py:82
#: audits/models.py:83
msgid "Username/password check failed"
msgstr "用户名/密码 校验失败"
#: audits/models.py:83
#: audits/models.py:84
msgid "MFA authentication failed"
msgstr "MFA 认证失败"
#: audits/models.py:84
#: audits/models.py:85
msgid "Username does not exist"
msgstr "用户名不存在"
#: audits/models.py:85
#: audits/models.py:86
msgid "Password expired"
msgstr "密码过期"
#: audits/models.py:90 xpack/plugins/cloud/models.py:164
#: audits/models.py:91 xpack/plugins/cloud/models.py:164
#: xpack/plugins/cloud/models.py:178
msgid "Failed"
msgstr "失败"
#: audits/models.py:94
#: audits/models.py:95
msgid "Login type"
msgstr "登录方式"
#: audits/models.py:95
#: audits/models.py:96
msgid "Login ip"
msgstr "登录IP"
#: audits/models.py:96
#: audits/models.py:97
msgid "Login city"
msgstr "登录城市"
#: audits/models.py:97
#: audits/models.py:98
msgid "User agent"
msgstr "Agent"
#: audits/models.py:98 audits/templates/audits/login_log_list.html:54
#: audits/models.py:99 audits/templates/audits/login_log_list.html:56
#: users/forms.py:142 users/models/user.py:76
#: users/templates/users/first_login.html:45
msgid "MFA"
msgstr "MFA"
#: audits/models.py:99 audits/templates/audits/login_log_list.html:55
#: xpack/plugins/change_auth_plan/models.py:421
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:15
#: audits/models.py:100 audits/templates/audits/login_log_list.html:57
#: xpack/plugins/cloud/models.py:172
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_history.html:69
msgid "Reason"
msgstr "原因"
#: audits/models.py:100 audits/templates/audits/login_log_list.html:56
#: 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:67
msgid "Status"
msgstr "状态"
#: audits/models.py:101
#: audits/models.py:102
msgid "Date login"
msgstr "登录日期"
......@@ -1953,10 +1901,6 @@ msgstr "登录日期"
#: ops/templates/ops/task_history.html:58 perms/models.py:34
#: perms/templates/perms/asset_permission_detail.html:86 terminal/models.py:165
#: terminal/templates/terminal/session_list.html:78
#: xpack/plugins/change_auth_plan/models.py:312
#: xpack/plugins/change_auth_plan/models.py:424
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:59
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:17
msgid "Date start"
msgstr "开始日期"
......@@ -1980,7 +1924,7 @@ msgstr "选择用户"
msgid "Search"
msgstr "搜索"
#: audits/templates/audits/login_log_list.html:48
#: audits/templates/audits/login_log_list.html:50
#: ops/templates/ops/adhoc_detail.html:49
#: ops/templates/ops/adhoc_history_detail.html:49
#: ops/templates/ops/task_detail.html:56
......@@ -1990,19 +1934,25 @@ msgstr "搜索"
msgid "ID"
msgstr "ID"
#: audits/templates/audits/login_log_list.html:51
#: audits/templates/audits/login_log_list.html:53
msgid "UA"
msgstr "Agent"
#: audits/templates/audits/login_log_list.html:53
#: audits/templates/audits/login_log_list.html:55
msgid "City"
msgstr "城市"
#: audits/templates/audits/login_log_list.html:57
#: audits/templates/audits/login_log_list.html:59
#: ops/templates/ops/task_list.html:32
msgid "Date"
msgstr "日期"
#: audits/templates/audits/login_log_list.html:85
#, fuzzy
#| msgid "Login log"
msgid "Export login log"
msgstr "登录日志"
#: audits/templates/audits/operate_log_list.html:71
#: audits/templates/audits/password_change_log_list.html:53
#: ops/templates/ops/task_adhoc.html:63
......@@ -2011,33 +1961,33 @@ msgstr "日期"
msgid "Datetime"
msgstr "日期"
#: audits/views.py:70 audits/views.py:114 audits/views.py:150
#: audits/views.py:194 audits/views.py:225 templates/_nav.html:72
#: audits/views.py:85 audits/views.py:129 audits/views.py:165
#: audits/views.py:209 audits/views.py:240 templates/_nav.html:72
msgid "Audits"
msgstr "日志审计"
#: audits/views.py:71 templates/_nav.html:76
#: audits/views.py:86 templates/_nav.html:76
msgid "FTP log"
msgstr "FTP日志"
#: audits/views.py:115 templates/_nav.html:77
#: audits/views.py:130 templates/_nav.html:77
msgid "Operate log"
msgstr "操作日志"
#: audits/views.py:151 templates/_nav.html:78
#: audits/views.py:166 templates/_nav.html:78
msgid "Password change log"
msgstr "改密日志"
#: audits/views.py:195 templates/_nav.html:75
#: audits/views.py:210 templates/_nav.html:75
msgid "Login log"
msgstr "登录日志"
#: audits/views.py:226 ops/views/command.py:44
#: audits/views.py:241 ops/views/command.py:44
msgid "Command execution list"
msgstr "命令执行列表"
#: authentication/api/auth.py:46 users/templates/users/login.html:52
#: users/templates/users/new_login.html:71
#: users/templates/users/new_login.html:97
msgid "Log in frequently and try again later"
msgstr "登录频繁, 稍后重试"
......@@ -2284,10 +2234,6 @@ msgstr "完成时间"
#: ops/models/adhoc.py:326 ops/templates/ops/adhoc_history.html:57
#: ops/templates/ops/task_history.html:63 ops/templates/ops/task_list.html:33
#: xpack/plugins/change_auth_plan/models.py:315
#: xpack/plugins/change_auth_plan/models.py:427
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:58
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:16
msgid "Time"
msgstr "时间"
......@@ -2311,9 +2257,7 @@ msgstr "结果"
msgid "Adhoc result summary"
msgstr "汇总"
#: ops/models/command.py:22
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:56
#: xpack/plugins/cloud/models.py:170
#: ops/models/command.py:22 xpack/plugins/cloud/models.py:170
msgid "Result"
msgstr "结果"
......@@ -2347,7 +2291,6 @@ msgid "Run as"
msgstr "运行用户"
#: ops/templates/ops/adhoc_detail.html:94 ops/templates/ops/task_list.html:28
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:18
msgid "Run times"
msgstr "执行次数"
......@@ -2506,7 +2449,6 @@ msgid "Versions"
msgstr "版本"
#: ops/templates/ops/task_list.html:63
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:52
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_list.html:52
msgid "Run"
msgstr "执行"
......@@ -2582,9 +2524,6 @@ msgstr "用户或用户组"
#: perms/templates/perms/asset_permission_asset.html:27
#: perms/templates/perms/asset_permission_detail.html:27
#: perms/templates/perms/asset_permission_user.html:27
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:20
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:23
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:20
msgid "Assets and node"
msgstr "资产或节点"
......@@ -2599,7 +2538,6 @@ msgstr "添加资产"
#: settings/templates/settings/terminal_setting.html:95
#: settings/templates/settings/terminal_setting.html:117
#: users/templates/users/user_group_detail.html:95
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:93
#: xpack/plugins/orgs/templates/orgs/org_detail.html:93
#: xpack/plugins/orgs/templates/orgs/org_detail.html:130
msgid "Add"
......@@ -2611,7 +2549,6 @@ msgstr "添加节点"
#: perms/templates/perms/asset_permission_asset.html:125
#: users/templates/users/user_detail.html:230
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:121
msgid "Join"
msgstr "加入"
......@@ -2699,33 +2636,38 @@ msgstr "资产授权用户列表"
msgid "Asset permission asset list"
msgstr "资产授权资产列表"
#: settings/api.py:24
#: settings/api.py:23
msgid "Test mail sent to {}, please check"
msgstr "邮件已经发送{}, 请检查"
#: settings/api.py:48
#: settings/api.py:47
msgid "Test ldap success"
msgstr "连接LDAP成功"
#: settings/api.py:78
#: settings/api.py:77 settings/utils.py:23
msgid "Search no entry matched in ou {}"
msgstr "在ou:{}中没有匹配条目"
#: settings/api.py:87
#: settings/api.py:86
msgid "Match {} s users"
msgstr "匹配 {} 个用户"
#: settings/api.py:110 settings/api.py:146
#: settings/api.py:109
msgid ""
"User is not currently selected, please check the user you want to import"
msgstr "当前无勾选用户,请勾选你想要导入的用户"
#: settings/api.py:139 settings/api.py:175
msgid ""
"Error: Account invalid (Please make sure the information such as Access key "
"or Secret key is correct)"
msgstr "错误:账户无效 (请确保 Access key 或 Secret key 等信息正确)"
#: settings/api.py:116 settings/api.py:152
#: settings/api.py:145 settings/api.py:181
msgid "Create succeed"
msgstr "创建成功"
#: settings/api.py:134 settings/api.py:172
#: settings/api.py:163 settings/api.py:201
#: settings/templates/settings/terminal_setting.html:151
msgid "Delete succeed"
msgstr "删除成功"
......@@ -2973,6 +2915,20 @@ msgstr "开启后,用户密码修改、重置必须包含特殊字符"
msgid "Setting"
msgstr "设置"
#: settings/templates/settings/_ldap_list_users_modal.html:7
msgid "Ldap users"
msgstr "Ldap 用户列表"
#: settings/templates/settings/_ldap_list_users_modal.html:36
#: users/models/user.py:56 users/templates/users/user_detail.html:71
#: users/templates/users/user_profile.html:59
msgid "Email"
msgstr "邮件"
#: settings/templates/settings/_ldap_list_users_modal.html:37
msgid "Is imported"
msgstr "是否已经导入"
#: settings/templates/settings/basic_setting.html:15
#: settings/templates/settings/email_setting.html:15
#: settings/templates/settings/ldap_setting.html:15
......@@ -3027,6 +2983,10 @@ msgstr "索引"
msgid "Doc type"
msgstr "文档类型"
#: settings/templates/settings/ldap_setting.html:65
msgid "Sync User"
msgstr "同步用户"
#: settings/templates/settings/replay_storage_create.html:66
msgid "Bucket"
msgstr "桶名称"
......@@ -3127,6 +3087,43 @@ msgstr "删除失败"
msgid "Are you sure about deleting it?"
msgstr "您确定删除吗?"
#: settings/utils.py:30
msgid "Have user but attr mapping error"
msgstr "有用户但attr映射错误"
#: settings/utils.py:60
msgid "No"
msgstr "否"
#: settings/utils.py:69
msgid "Yes"
msgstr "是"
#: settings/utils.py:134
msgid ""
"Import {} users successfully; import {} users failed, the database already "
"exists with the same name"
msgstr "导入 {} 个用户成功; 导入 {} 这些用户失败,数据库已经存在同名的用户"
#: settings/utils.py:139
msgid ""
"Import {} users successfully; import {} users failed, the database already "
"exists with the same name; import {}users failed, Because’TypeError' object "
"has no attribute 'keys'"
msgstr ""
"导入 {} 个用户成功; 导入 {} 这些用户失败,数据库已经存在同名的用户; 导入 {} "
"这些用户失败,因为对象没有属性'keys'"
#: settings/utils.py:145
msgid "Import {} users successfully"
msgstr "导入 {} 个用户成功"
#: settings/utils.py:148
msgid ""
"Import {} users successfully;import {} users failed, Because’TypeError' "
"object has no attribute 'keys'"
msgstr "导入 {} 个用户成功; 导入 {} 这些用户失败,因为对象没有属性'keys'"
#: 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 templates/_nav.html:107
......@@ -3186,7 +3183,7 @@ msgid "Logout"
msgstr "注销登录"
#: templates/_header_bar.html:101 users/templates/users/login.html:46
#: users/templates/users/login.html:72 users/templates/users/new_login.html:96
#: users/templates/users/login.html:72 users/templates/users/new_login.html:119
msgid "Login"
msgstr "登录"
......@@ -3332,7 +3329,7 @@ msgstr "验证码"
#: templates/flash_message_standalone.html:35
#: users/templates/users/login.html:27 users/templates/users/login_otp.html:27
#: users/templates/users/new_login.html:56
#: users/templates/users/new_login.html:82
#: users/templates/users/reset_password.html:25
#: xpack/plugins/interface/models.py:36
msgid "Welcome to the Jumpserver open source fortress"
......@@ -3816,11 +3813,6 @@ msgstr "启用"
msgid "Force enable"
msgstr "强制启用"
#: users/models/user.py:56 users/templates/users/user_detail.html:71
#: users/templates/users/user_profile.html:59
msgid "Email"
msgstr "邮件"
#: users/models/user.py:67
msgid "Avatar"
msgstr "头像"
......@@ -3944,7 +3936,7 @@ msgstr "获取更多信息"
#: users/templates/users/forgot_password.html:11
#: users/templates/users/forgot_password.html:31
#: users/templates/users/login.html:83 users/templates/users/new_login.html:100
#: users/templates/users/login.html:83 users/templates/users/new_login.html:123
msgid "Forgot password"
msgstr "忘记密码"
......@@ -3984,11 +3976,11 @@ msgstr ""
msgid "Changes the world, starting with a little bit."
msgstr "改变世界,从一点点开始。"
#: users/templates/users/login.html:54 users/templates/users/new_login.html:73
#: users/templates/users/login.html:54 users/templates/users/new_login.html:99
msgid "The user password has expired"
msgstr "用户密码已过期"
#: users/templates/users/login.html:57 users/templates/users/new_login.html:76
#: users/templates/users/login.html:57 users/templates/users/new_login.html:102
msgid "Captcha invalid"
msgstr "验证码错误"
......@@ -4028,7 +4020,7 @@ msgstr "6位数字"
msgid "Can't provide security? Please contact the administrator!"
msgstr "如果不能提供MFA验证码,请联系管理员!"
#: users/templates/users/new_login.html:61
#: users/templates/users/new_login.html:87
msgid "Welcome back, please enter username and password to login"
msgstr "欢迎回来,请输入用户名和密码登录"
......@@ -4672,192 +4664,6 @@ msgstr "MFA 解绑成功"
msgid "MFA disable success, return login page"
msgstr "MFA 解绑成功,返回登录页面"
#: xpack/plugins/change_auth_plan/forms.py:19
#: xpack/plugins/change_auth_plan/models.py:71
#: xpack/plugins/change_auth_plan/models.py:148
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:100
msgid "Cycle perform"
msgstr "周期执行"
#: xpack/plugins/change_auth_plan/forms.py:19
msgid "Tips: (Units: hour)"
msgstr "提示:(单位: 时)"
#: xpack/plugins/change_auth_plan/forms.py:27
msgid "Password length"
msgstr "密码长度"
#: xpack/plugins/change_auth_plan/forms.py:59
msgid "* Please enter custom password"
msgstr "* 请输入自定义密码"
#: xpack/plugins/change_auth_plan/forms.py:69
msgid "* Please enter a valid crontab expression"
msgstr "* 请输入有效的 crontab 表达式"
#: xpack/plugins/change_auth_plan/forms.py:107
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:54
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:81
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:17
msgid "Timing perform"
msgstr "定时执行"
#: xpack/plugins/change_auth_plan/forms.py:110
msgid ""
"eg: Every Sunday 03:05 run (5 3 * * 0) <br> Tips: Using 5 digits linux "
"crontab expressions (<a href='https://tool.lu/crontab/' "
"target='_blank'>Online tools</a>) <br>Note: If both Regularly perform and "
"Cycle perform are set, give priority to Regularly perform"
msgstr ""
"eg:每周日 03:05 执行(5 3 * * 0) <br> 提示: 使用5位 Linux crontab 表达式"
"(<a href='https://tool.lu/crontab/' target='_blank'>在线工具</a>) <br>注"
"意: 如果同时设置了定期执行和周期执行,优先使用定期执行"
#: xpack/plugins/change_auth_plan/meta.py:9
#: xpack/plugins/change_auth_plan/models.py:106
#: xpack/plugins/change_auth_plan/models.py:319
#: xpack/plugins/change_auth_plan/views.py:32
#: xpack/plugins/change_auth_plan/views.py:48
#: xpack/plugins/change_auth_plan/views.py:69
#: xpack/plugins/change_auth_plan/views.py:83
#: xpack/plugins/change_auth_plan/views.py:110
#: xpack/plugins/change_auth_plan/views.py:126
#: xpack/plugins/change_auth_plan/views.py:140
msgid "Change auth plan"
msgstr "改密计划"
#: xpack/plugins/change_auth_plan/models.py:50
msgid "Custom password"
msgstr "自定义密码"
#: xpack/plugins/change_auth_plan/models.py:51
msgid "All assets use the same random password"
msgstr "所有资产使用相同的随机密码"
#: xpack/plugins/change_auth_plan/models.py:52
msgid "All assets use different random password"
msgstr "所有资产使用不同的随机密码"
#: xpack/plugins/change_auth_plan/models.py:58
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:53
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:12
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:13
msgid "Asset username"
msgstr "资产用户名"
#: xpack/plugins/change_auth_plan/models.py:75
#: xpack/plugins/change_auth_plan/models.py:146
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:92
msgid "Regularly perform"
msgstr "定期执行"
#: xpack/plugins/change_auth_plan/models.py:79
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:45
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:69
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_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:83
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:74
msgid "Password rules"
msgstr "密码规则"
#: xpack/plugins/change_auth_plan/models.py:323
msgid "Change auth plan snapshot"
msgstr "改密计划快照"
#: xpack/plugins/change_auth_plan/models.py:338
#: xpack/plugins/change_auth_plan/models.py:431
msgid "Change auth plan history"
msgstr "改密计划历史"
#: xpack/plugins/change_auth_plan/models.py:440
msgid "Change auth plan task"
msgstr "改密计划任务"
#: xpack/plugins/change_auth_plan/models.py:458
msgid "Authentication failed"
msgstr "认证失败"
#: xpack/plugins/change_auth_plan/models.py:460
msgid "Connection timeout"
msgstr "连接超时"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:17
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:20
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:17
#: xpack/plugins/change_auth_plan/views.py:84
msgid "Plan detail"
msgstr "计划详情"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:23
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:26
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:23
#: xpack/plugins/change_auth_plan/views.py:127
msgid "Run history list"
msgstr "执行历史列表"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:76
msgid "Add asset to this plan"
msgstr "添加资产"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:104
msgid "Add node to this plan"
msgstr "添加节点"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:76
msgid "Length"
msgstr "长度"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:84
msgid "Yes"
msgstr "是"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:86
msgid "No"
msgstr "否"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:31
msgid "History of plan"
msgstr "执行历史"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_list.html:104
msgid "Log"
msgstr "日志"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:61
msgid "Retry"
msgstr "重试"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_history_task_list.html:96
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:101
msgid "Run failed"
msgstr "执行失败"
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:5
#: xpack/plugins/change_auth_plan/views.py:49
msgid "Create plan"
msgstr "创建计划"
#: xpack/plugins/change_auth_plan/views.py:33
msgid "Plan list"
msgstr "计划列表"
#: xpack/plugins/change_auth_plan/views.py:70
msgid "Update plan"
msgstr "更新计划"
#: xpack/plugins/change_auth_plan/views.py:111
msgid "plan asset list"
msgstr "计划资产列表"
#: xpack/plugins/change_auth_plan/views.py:141
msgid "Run history task list"
msgstr "执行历史任务列表"
#: xpack/plugins/cloud/api.py:61 xpack/plugins/cloud/providers/base.py:84
msgid "Account unavailable"
msgstr "账户无效"
......@@ -5090,8 +4896,8 @@ msgstr "登录页面图片"
#: xpack/plugins/interface/forms.py:27
msgid ""
"Tips: This will be displayed on the enterprise user login page. (suggest "
"image size: 635px*472px)"
msgstr "提示:将会显示在企业版用户登录页面(建议图片大小为: 635px*472px)"
"image size: 492px*472px)"
msgstr "提示:将会显示在企业版用户登录页面(建议图片大小为: 492px*472px)"
#: xpack/plugins/interface/forms.py:33 xpack/plugins/interface/models.py:23
msgid "Website icon"
......@@ -5265,6 +5071,115 @@ msgstr "创建组织"
msgid "Update org"
msgstr "更新组织"
#~ msgid "Cycle perform"
#~ msgstr "周期执行"
#~ msgid "Tips: (Units: hour)"
#~ msgstr "提示:(单位: 时)"
#~ msgid "Password length"
#~ msgstr "密码长度"
#~ msgid "* Please enter custom password"
#~ msgstr "* 请输入自定义密码"
#~ msgid "* Please enter a valid crontab expression"
#~ msgstr "* 请输入有效的 crontab 表达式"
#~ msgid "Timing perform"
#~ msgstr "定时执行"
#~ msgid ""
#~ "eg: Every Sunday 03:05 run (5 3 * * 0) <br> Tips: Using 5 digits linux "
#~ "crontab expressions (<a href='https://tool.lu/crontab/' "
#~ "target='_blank'>Online tools</a>) <br>Note: If both Regularly perform and "
#~ "Cycle perform are set, give priority to Regularly perform"
#~ msgstr ""
#~ "eg:每周日 03:05 执行(5 3 * * 0) <br> 提示: 使用5位 Linux crontab 表达"
#~ "式(<a href='https://tool.lu/crontab/' target='_blank'>在线工具</a>) <br>"
#~ "注意: 如果同时设置了定期执行和周期执行,优先使用定期执行"
#~ msgid "Change auth plan"
#~ msgstr "改密计划"
#~ msgid "Custom password"
#~ msgstr "自定义密码"
#~ msgid "All assets use the same random password"
#~ msgstr "所有资产使用相同的随机密码"
#~ msgid "All assets use different random password"
#~ msgstr "所有资产使用不同的随机密码"
#~ msgid "Asset username"
#~ msgstr "资产用户名"
#~ msgid "Regularly perform"
#~ msgstr "定期执行"
#~ msgid "Password strategy"
#~ msgstr "密码策略"
#~ msgid "Password rules"
#~ msgstr "密码规则"
#~ msgid "Change auth plan snapshot"
#~ msgstr "改密计划快照"
#~ msgid "Change auth plan history"
#~ msgstr "改密计划历史"
#~ msgid "Change auth plan task"
#~ msgstr "改密计划任务"
#~ msgid "Authentication failed"
#~ msgstr "认证失败"
#~ msgid "Connection timeout"
#~ msgstr "连接超时"
#~ msgid "Plan detail"
#~ msgstr "计划详情"
#~ msgid "Run history list"
#~ msgstr "执行历史列表"
#~ msgid "Add asset to this plan"
#~ msgstr "添加资产"
#~ msgid "Add node to this plan"
#~ msgstr "添加节点"
#~ msgid "Length"
#~ msgstr "长度"
#~ msgid "History of plan"
#~ msgstr "执行历史"
#~ msgid "Log"
#~ msgstr "日志"
#~ msgid "Retry"
#~ msgstr "重试"
#~ msgid "Run failed"
#~ msgstr "执行失败"
#~ msgid "Create plan"
#~ msgstr "创建计划"
#~ msgid "Plan list"
#~ msgstr "计划列表"
#~ msgid "Update plan"
#~ msgstr "更新计划"
#~ msgid "plan asset list"
#~ msgstr "计划资产列表"
#~ msgid "Run history task list"
#~ msgstr "执行历史任务列表"
#~ msgid ""
#~ "* When selecting a custom password strategy, please enter the password"
#~ msgstr "* 选择自定义密码策略时,请输入密码"
......@@ -5392,9 +5307,6 @@ msgstr "更新组织"
#~ msgid "* required Must set exact system platform, Windows, Linux ..."
#~ msgstr "* required 必须准确设置操作系统平台,如Windows, Linux ..."
#~ msgid "Unblock user successfully. "
#~ msgstr "解除登录限制成功"
#~ msgid "Clear"
#~ msgstr "清除"
......
......@@ -5,17 +5,16 @@ import os
import json
import jms_storage
from rest_framework.views import Response, APIView
from ldap3 import Server, Connection
from rest_framework.views import Response, APIView
from django.conf import settings
from django.core.mail import send_mail
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from common.permissions import IsOrgAdmin, IsSuperUser
from .serializers import (
MailTestSerializer, LDAPTestSerializer
)
from .models import Setting
from .utils import get_ldap_users_list, save_user
from common.permissions import IsOrgAdmin, IsSuperUser
from .serializers import MailTestSerializer, LDAPTestSerializer
class MailTestingAPI(APIView):
......@@ -91,6 +90,36 @@ class LDAPTestingAPI(APIView):
return Response({"error": str(serializer.errors)}, status=401)
class LDAPSyncAPI(APIView):
permission_classes = (IsOrgAdmin,)
def get(self, request):
ldap_users_list = get_ldap_users_list()
if not isinstance(ldap_users_list, list):
return Response(ldap_users_list, status=401)
return Response(ldap_users_list)
class LDAPConfirmSyncAPI(APIView):
permission_classes = (IsOrgAdmin,)
def post(self, request):
user_names = request.data.get('user_names', '')
if not user_names:
error = _('User is not currently selected, please check the user '
'you want to import')
return Response({'error': error}, status=401)
ldap_users_list = get_ldap_users_list(user_names=user_names)
if not isinstance(ldap_users_list, list):
return Response(ldap_users_list, status=401)
save_result = save_user(ldap_users_list)
if 'error' in save_result.keys():
return Response(save_result, status=401)
return Response(save_result)
class ReplayStorageCreateAPI(APIView):
permission_classes = (IsSuperUser,)
......
{% extends '_modal.html' %}
{% load i18n %}
{% load static %}
{% block modal_class %}modal-lg{% endblock %}
{% block modal_id %}ldap_list_users_modal{% endblock %}
{% block modal_title%}{% trans "Ldap users" %}{% endblock %}
{% block modal_body %}
<link href="{% static 'css/plugins/ztree/awesomeStyle/awesome.css' %}" rel="stylesheet">
<script type="text/javascript" src="{% static 'js/plugins/ztree/jquery.ztree.all.min.js' %}"></script>
<script src="{% static 'js/jquery.form.min.js' %}"></script>
<style>
.inmodal .modal-header {
padding: 10px 10px;
text-align: center;
}
#assetTree2.ztree * {
background-color: #f8fafb;
}
#assetTree2.ztree {
background-color: #f8fafb;
}
</style>
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-lg-12 animated fadeInRight" id="split-right">
<div class="mail-box-header">
<table class="table table-striped table-bordered table-hover " id="ldap_list_users_table" style="width: 100%">
<thead>
<tr>
<th class="text-center"><input type="checkbox" class="ipt_check_all"></th>
<th class="text-center">{% trans 'Username' %}</th>
<th class="text-center">{% trans 'Name' %}</th>
<th class="text-center">{% trans 'Email' %}</th>
<th class="text-center">{% trans 'Is imported' %}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
var ldap_users_table = 0;
function initLdapTable() {
if(ldap_users_table){
return
}
var options = {
ele: $('#ldap_list_users_table'),
ajax_url: '{% url "api-settings:ldap-sync" %}',
columns: [
{data: "username" },{data: "username" }, {data: "name" },
{data:"email"}, {data:'is_imported'}
],
pageLength: 10
};
ldap_users_table = jumpserver.initDataTable(options);
return ldap_users_table
}
$(document).ready(function(){
}).on('show.bs.modal', function () {
initLdapTable();
})
.on('click','.close_btn1',function () {
window.location.reload()
})
.on('click','.close_btn2',function () {
window.location.reload()
})
</script>
{% endblock %}
{% block modal_button %}
{{ block.super }}
{% endblock %}
{% block modal_confirm_id %}btn_ldap_modal_confirm{% endblock %}
......@@ -31,7 +31,7 @@
<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">
<form id="ldap_form" action="" method="post" class="form-horizontal">
{% if form.non_field_errors %}
<div class="alert alert-danger">
{{ form.non_field_errors }}
......@@ -61,6 +61,8 @@
<button class="btn btn-default btn-test" type="button"> {% trans 'Test connection' %}</button>
<button class="btn btn-default" type="reset"> {% trans 'Reset' %}</button>
<button id="submit_button" class="btn btn-primary" type="submit">{% trans 'Submit' %}</button>
{# <button class="btn btn-primary sync_button " data-toggle="modal" data-target="#sync_users_modal" type="button">{% trans 'Synchronization' %}</button>#}
<button class="btn btn-primary sync_button " data-toggle="modal" data-target="#ldap_list_users_modal" type="button">{% trans 'Sync User' %}</button>
</div>
</div>
</form>
......@@ -72,10 +74,12 @@
</div>
</div>
</div>
{% include 'settings/_ldap_list_users_modal.html' %}
{% endblock %}
{% block custom_foot_js %}
<script>
$(document).ready(function () {
})
.on("click", ".btn-test", function () {
var data = {};
......@@ -102,5 +106,30 @@ $(document).ready(function () {
error: error
});
})
.on("click","#btn_ldap_modal_confirm",function () {
var user_names=[];
var cheked = $("tbody input[type='checkbox']:checked").each(function () {
user_names.push($(this).attr('id'));
});
var the_url = "{% url "api-settings:ldap-comfirm-sync" %}";
function error(message) {
toastr.error(message)
}
function success(message) {
toastr.success(message.msg)
}
APIUpdateAttr({
url: the_url,
body: JSON.stringify({'user_names':user_names}),
method: "POST",
flash_message: false,
success: success,
error: error
});
})
</script>
{% endblock %}
......@@ -9,6 +9,8 @@ app_name = 'common'
urlpatterns = [
path('mail/testing/', api.MailTestingAPI.as_view(), name='mail-testing'),
path('ldap/testing/', api.LDAPTestingAPI.as_view(), name='ldap-testing'),
path('ldap/sync/', api.LDAPSyncAPI.as_view(), name='ldap-sync'),
path('ldap/comfirm/sync/', api.LDAPConfirmSyncAPI.as_view(), name='ldap-comfirm-sync'),
path('terminal/replay-storage/create/', api.ReplayStorageCreateAPI.as_view(), name='replay-storage-create'),
path('terminal/replay-storage/delete/', api.ReplayStorageDeleteAPI.as_view(), name='replay-storage-delete'),
path('terminal/command-storage/create/', api.CommandStorageCreateAPI.as_view(), name='command-storage-create'),
......
# -*- coding: utf-8 -*-
#
from ldap3 import Server, Connection
from django.utils.translation import ugettext_lazy as _
from .models import settings
from users.models import User
def ldap_conn(host, use_ssl, bind_dn, password):
server = Server(host, use_ssl=use_ssl)
conn = Connection(server, bind_dn, password)
return conn
def ldap_search(conn, search_ougroup, search_filter, attr_map, user_names=None):
users_list = []
for search_ou in str(search_ougroup).split("|"):
ok = conn.search(search_ou, search_filter % ({"user": "*"}),
attributes=list(attr_map.values()))
if not ok:
error = _("Search no entry matched in ou {}").format(search_ou)
return {"error": error}
ldap_map_users(conn, attr_map, users_list, user_names)
if len(users_list) > 0:
return users_list
return {"error": _("Have user but attr mapping error")}
def get_ldap_users_list(user_names=None):
ldap_setting = get_ldap_setting()
conn = ldap_conn(ldap_setting['host'], ldap_setting['use_ssl'],
ldap_setting['bind_dn'], ldap_setting['password'])
try:
conn.bind()
except Exception as e:
return {"error": str(e)}
result_search = ldap_search(conn, ldap_setting['search_ougroup'],
ldap_setting['search_filter'],
ldap_setting['attr_map'], user_names=user_names)
return result_search
def ldap_map_users(conn, attr_map, users, user_names=None):
for entry in conn.entries:
user = entry_user(entry, attr_map)
if user_names:
if user.get('username', '') in user_names:
users.append(user)
else:
users.append(user)
def entry_user(entry, attr_map):
user = {}
user['is_imported'] = _('No')
for attr, mapping in attr_map.items():
if not hasattr(entry, mapping):
continue
value = getattr(entry, mapping).value
user[attr] = value if value else ''
if attr != 'username':
continue
if User.objects.filter(username=user[attr]):
user['is_imported'] = _('Yes')
return user
def get_ldap_setting():
host = settings.AUTH_LDAP_SERVER_URI
bind_dn = settings.AUTH_LDAP_BIND_DN
password = settings.AUTH_LDAP_BIND_PASSWORD
use_ssl = settings.AUTH_LDAP_START_TLS
search_ougroup = settings.AUTH_LDAP_SEARCH_OU
search_filter = settings.AUTH_LDAP_SEARCH_FILTER
attr_map = settings.AUTH_LDAP_USER_ATTR_MAP
auth_ldap = settings.AUTH_LDAP
ldap_setting = {
'host': host, 'bind_dn': bind_dn, 'password': password,
'search_ougroup': search_ougroup, 'search_filter': search_filter,
'attr_map': attr_map, 'auth_ldap': auth_ldap, 'use_ssl': use_ssl,
}
return ldap_setting
def save_user(users):
exist = []
username_list = [item.get('username') for item in users]
for name in username_list:
if User.objects.filter(username=name).exclude(source='ldap'):
exist.append(name)
users = [user for user in users if (user.get('username') not in exist)]
result_save = save(users, exist)
return result_save
def save(users, exist):
fail_user = []
for item in users:
item = set_default_item(item)
user = User.objects.filter(username=item['username'], source='ldap')
user = user.first()
if not user:
try:
user = User.objects.create(**item)
except Exception as e:
fail_user.append(item.get('username'))
continue
for key, value in item.items():
user.key = value
user.save()
get_msg = get_messages(users, exist, fail_user)
return get_msg
def set_default_item(item):
item['source'] = 'ldap'
if not item.get('email', ''):
item['email'] = item['username'] + '@' + item['username'] + '.com'
if 'is_imported' in item.keys():
item.pop('is_imported')
return item
def get_messages(users, exist, fail_user):
if exist:
info = _("Import {} users successfully; import {} users failed, the "
"database already exists with the same name")
msg = info.format(len(users), str(exist))
if fail_user:
info = _("Import {} users successfully; import {} users failed, "
"the database already exists with the same name; import {}"
"users failed, Because’TypeError' object has no attribute "
"'keys'")
msg = info.format(len(users)-len(fail_user), str(exist), str(fail_user))
else:
msg = _("Import {} users successfully").format(len(users))
if fail_user:
info = _("Import {} users successfully;import {} users failed, "
"Because’TypeError' object has no attribute 'keys'")
msg = info.format(len(users)-len(fail_user), str(fail_user))
return {'msg': msg}
\ No newline at end of file
......@@ -8,7 +8,7 @@
<div class="modal-dialog {% block modal_class %}{% endblock %}">
<div class="modal-content animated fadeIn">
<div class="modal-header">
<button data-dismiss="modal" class="close" type="button"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<button data-dismiss="modal" class="close close_btn1" type="button"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">{% block modal_title %}{% endblock %}</h4>
<small>{% block modal_comment %}{% endblock %}</small>
</div>
......@@ -18,7 +18,7 @@
</div>
<div class="modal-footer">
{% block modal_button %}
<button data-dismiss="modal" class="btn btn-white" type="button">{% trans "Close" %}</button>
<button data-dismiss="modal" class="btn btn-white close_btn2" type="button">{% trans "Close" %}</button>
<button class="btn btn-primary" type="button" id="{% block modal_confirm_id %}{% endblock %}">{% trans 'Confirm' %}</button>
{% endblock %}
</div>
......
......@@ -32,95 +32,106 @@
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/plugins/datatables/datatables.min.js' %}"></script>
{# <script src="{% static 'js/angular.min.js' %}"></script>#}
<style>
.box-1{
height: 472px;
width: 984px;
margin-right: auto;
margin-left: auto;
margin-top: calc((100vh - 470px)/2);
}
.box-2{
height: 100%;
width: 50%;
float: right;
}
.box-3{
text-align: center;
background-color: white;
height: 100%;
width: 50%;
}
.captcha {
float: right;
}
</style>
</head>
<body>
<div class="login-dialog">
<div class="">
<div class="row" style="height: 472px">
<div class="col-md-4 col-md-offset-2 input_shadow-1" style="text-align: center;background-color: white; padding-right: 0px;height: 100%">
<div style="background-color: white">
{% if interface.login_title %}
<div style="margin-top: 40px">
<span style="font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;">{{ interface.login_title }}</span>
</div>
<body style="height: 100%">
<div>
<div class="box-1">
<div class="box-2">
{% if interface.login_image %}
<img src="{{ MEDIA_URL }}{{ interface.login_image }}" style="height: 100%; width: 100%"/>
{% else %}
<div style="margin-top: 40px">
<span style="font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;">{% trans 'Welcome to the Jumpserver open source fortress' %}</span>
</div>
<img src="{% static 'img/login/login_image_1.png' %}" style=" height: 100%; width: 100%"/>
{% endif %}
</div>
<div class="box-3">
<div style="background-color: white">
{% if interface.login_title %}
<div style="margin-top: 40px;padding-top: 50px;">
<span style="font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;">{{ interface.login_title }}</span>
</div>
{% else %}
<div style="margin-top: 40px;padding-top: 50px;">
<span style="font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;">{% trans 'Welcome to the Jumpserver open source fortress' %}</span>
</div>
{% endif %}
<div style="font-size: 12px;color: #999999;letter-spacing: 0;line-height: 18px;margin-top: 10px">
{% trans 'Welcome back, please enter username and password to login' %}
{% trans 'Welcome back, please enter username and password to login' %}
</div>
<div style="margin-bottom: 10px">
<div>
<div class="col-md-1"></div>
<div class="contact-form col-md-10" style="margin-top: 20px;height: 35px">
<form id="contact-form" action="" method="post" role="form" novalidate="novalidate">
{% csrf_token %}
<div style="height: 48px;color: red">
{% if block_login %}
<p class="red-fonts">{% trans 'Log in frequently and try again later' %}</p>
{% elif password_expired %}
<p class="red-fonts">{% trans 'The user password has expired' %}</p>
{% elif form.errors %}
{% if 'captcha' in form.errors %}
<p class="red-fonts">{% trans 'Captcha invalid' %}</p>
{% else %}
<p class="red-fonts">{{ form.non_field_errors.as_text }}</p>
{% endif %}
{% endif %}
</div>
<div>
<div class="col-md-1"></div>
<div class="contact-form col-md-10" style="margin-top: 20px;height: 35px">
<form id="contact-form" action="" method="post" role="form" novalidate="novalidate">
{% csrf_token %}
<div style="height: 48px;color: red">
{% if block_login %}
<p class="red-fonts">{% trans 'Log in frequently and try again later' %}</p>
{% elif password_expired %}
<p class="red-fonts">{% trans 'The user password has expired' %}</p>
{% elif form.errors %}
{% if 'captcha' in form.errors %}
<p class="red-fonts">{% trans 'Captcha invalid' %}</p>
{% else %}
<p class="red-fonts">{{ form.non_field_errors.as_text }}</p>
{% endif %}
{% endif %}
</div>
<div class="form-group">
<input type="text" class="form-control" name="{{ form.username.html_name }}"
placeholder="{% trans 'Username' %}" required=""
value="{% if form.username.value %}{{ form.username.value }}{% endif %}" style="height: 35px">
</div>
<div class="form-group">
<input type="password" class="form-control" name="{{ form.password.html_name }}"
placeholder="{% trans 'Password' %}" required="">
</div>
<div class="form-group" style="height: 50px;margin-bottom: 0px">
{{ form.captcha }}
<div class="form-group">
<input type="text" class="form-control" name="{{ form.username.html_name }}" placeholder="{% trans 'Username' %}" required="" value="{% if form.username.value %}{{ form.username.value }}{% endif %}" style="height: 35px">
</div>
<div class="form-group">
<input type="password" class="form-control" name="{{ form.password.html_name }}" placeholder="{% trans 'Password' %}" required="">
</div>
<div class="form-group" style="height: 50px;margin-bottom: 0">
{{ form.captcha }}
</div>
<div class="form-group" style="margin-top: 10px">
<button type="submit" class="btn btn-transparent">{% trans 'Login' %}</button>
</div>
<div style="text-align: center">
<a href="{% url 'users:forgot-password' %}">
<small>{% trans 'Forgot password' %}?</small>
</a>
</div>
</form>
</div>
<div class="form-group" style="margin-top: 10px">
<button type="submit" class="btn btn-transparent">{% trans 'Login' %}</button>
</div>
<div style="text-align: center">
<a href="{% url 'users:forgot-password' %}">
<small>{% trans 'Forgot password' %}?</small>
</a>
</div>
</form>
</div>
<div class="col-md-1"></div>
<div class="col-md-1"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4 " style="padding-left: 0px; height: 100%">
{% if interface.login_image %}
<img src="{{ MEDIA_URL }}{{ interface.login_image }}" style="width: 100%; height: 100%;" class="input_shadow-1" />
{% else %}
<img src="{% static 'img/login/login-image.jpg' %}" style="width: 100%; height: 100%;" class="input_shadow-1" />
{% endif %}
</div>
</div>
<div class="col-md-2"></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment