Asset favor (#3352)

* [Update] 拆分filter org

* [Update] 修改session支持protocol搜索

* [Bugfix] 修复判断问题

* [Update] 支持收藏资产

* [update] 修改org resource queryset

* [Update] 修改form serializer 对应的多对多字段

* [Bugfix] 修复其他组织取消收藏的bug

* [Update] 去掉debug信息

* [Update] 修改remote app get queryset

* [Update] 修改remote app get queryset

* [Update] 修改没有授权时显示情况

* [Bugfix] 修复组织管理员查看用户权限失败问题

* [Update] 优化forms assets queryset设置
This commit is contained in:
BaiJiangJie
2019-10-18 15:05:45 +08:00
committed by 老广
parent ccdb770972
commit f3dc9b886b
55 changed files with 656 additions and 299 deletions

Binary file not shown.

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-15 17:37+0800\n"
"POT-Creation-Date: 2019-10-17 16:09+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"
@@ -193,11 +193,11 @@ msgstr "参数"
#: assets/templates/assets/cmd_filter_detail.html:77
#: assets/templates/assets/domain_detail.html:72
#: assets/templates/assets/system_user_detail.html:100
#: ops/templates/ops/adhoc_detail.html:86 orgs/models.py:16
#: perms/models/base.py:54
#: common/mixins/models.py:50 ops/templates/ops/adhoc_detail.html:86
#: orgs/models.py:16 perms/models/base.py:54
#: perms/templates/perms/asset_permission_detail.html:98
#: perms/templates/perms/remote_app_permission_detail.html:90
#: users/models/user.py:414 users/serializers/v1.py:141
#: users/models/user.py:414 users/serializers/v1.py:143
#: users/templates/users/user_detail.html:111
#: xpack/plugins/change_auth_plan/models.py:108
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:113
@@ -216,7 +216,8 @@ msgstr "创建者"
#: assets/models/label.py:25 assets/templates/assets/admin_user_detail.html:64
#: assets/templates/assets/cmd_filter_detail.html:69
#: assets/templates/assets/domain_detail.html:68
#: assets/templates/assets/system_user_detail.html:96 ops/models/adhoc.py:45
#: assets/templates/assets/system_user_detail.html:96
#: common/mixins/models.py:51 ops/models/adhoc.py:45
#: ops/templates/ops/adhoc_detail.html:90 ops/templates/ops/task_detail.html:64
#: orgs/models.py:17 perms/models/base.py:55
#: perms/templates/perms/asset_permission_detail.html:94
@@ -321,7 +322,6 @@ msgstr "远程应用"
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:53
#: xpack/plugins/gathered_user/templates/gathered_user/task_create_update.html:44
#: xpack/plugins/interface/templates/interface/interface.html:72
#: xpack/plugins/orgs/templates/orgs/org_create_update.html:33
#: xpack/plugins/vault/templates/vault/vault_create.html:45
msgid "Reset"
msgstr "重置"
@@ -524,7 +524,7 @@ msgstr "创建远程应用"
#: settings/templates/settings/terminal_setting.html:107
#: terminal/templates/terminal/session_list.html:36
#: terminal/templates/terminal/terminal_list.html:36
#: users/templates/users/_granted_assets.html:29
#: users/templates/users/_granted_assets.html:34
#: users/templates/users/user_group_list.html:38
#: users/templates/users/user_list.html:41
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:60
@@ -539,7 +539,6 @@ msgid "Action"
msgstr "动作"
#: applications/templates/applications/user_remote_app_list.html:52
#: assets/templates/assets/user_asset_list.html:32
#: perms/models/asset_permission.py:32
msgid "Connect"
msgstr "连接"
@@ -566,11 +565,11 @@ msgstr "远程应用详情"
msgid "My RemoteApp"
msgstr "我的远程应用"
#: assets/api/node.py:58
#: assets/api/node.py:61
msgid "You can't update the root node name"
msgstr "不能修改根节点名称"
#: assets/api/node.py:65
#: assets/api/node.py:68
msgid "Deletion failed and the node contains children or assets"
msgstr "删除失败,节点包含子节点或资产"
@@ -628,13 +627,13 @@ msgstr "标签"
#: assets/forms/asset.py:65 assets/forms/asset.py:112
#: assets/models/asset.py:144 assets/models/domain.py:26
#: assets/models/domain.py:52 assets/templates/assets/asset_detail.html:78
#: assets/templates/assets/user_asset_list.html:53
#: assets/templates/assets/user_asset_list.html:80
#: xpack/plugins/orgs/templates/orgs/org_list.html:18
msgid "Domain"
msgstr "网域"
#: assets/forms/asset.py:69 assets/forms/asset.py:103 assets/forms/asset.py:116
#: assets/forms/asset.py:152 assets/models/node.py:409
#: assets/forms/asset.py:152 assets/models/node.py:421
#: assets/templates/assets/asset_create.html:42
#: perms/forms/asset_permission.py:83 perms/forms/asset_permission.py:90
#: perms/templates/perms/asset_permission_list.html:53
@@ -702,7 +701,7 @@ msgstr "SSH网关支持代理SSH,RDP和VNC"
#: ops/models/adhoc.py:189 perms/templates/perms/asset_permission_list.html:70
#: perms/templates/perms/asset_permission_user.html:55
#: perms/templates/perms/remote_app_permission_user.html:54
#: settings/templates/settings/_ldap_list_users_modal.html:30 users/forms.py:14
#: settings/templates/settings/_ldap_list_users_modal.html:30 users/forms.py:13
#: users/models/user.py:371 users/templates/users/_select_user_modal.html:14
#: users/templates/users/user_detail.html:67
#: users/templates/users/user_list.html:36
@@ -729,7 +728,7 @@ msgstr "密码或密钥密码"
#: authentication/forms.py:15
#: authentication/templates/authentication/login.html:68
#: authentication/templates/authentication/new_login.html:95
#: settings/forms.py:114 users/forms.py:16 users/forms.py:28
#: settings/forms.py:114 users/forms.py:15 users/forms.py:27
#: users/templates/users/reset_password.html:53
#: users/templates/users/user_password_authentication.html:18
#: users/templates/users/user_password_update.html:44
@@ -790,10 +789,10 @@ msgstr "使用逗号分隔多个命令,如: /bin/whoami,/sbin/ifconfig"
#: assets/templates/assets/asset_detail.html:62
#: assets/templates/assets/asset_list.html:97
#: assets/templates/assets/domain_gateway_list.html:68
#: assets/templates/assets/user_asset_list.html:49
#: assets/templates/assets/user_asset_list.html:76
#: audits/templates/audits/login_log_list.html:60
#: perms/templates/perms/asset_permission_asset.html:58 settings/forms.py:144
#: users/templates/users/_granted_assets.html:26
#: users/templates/users/_granted_assets.html:31
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:54
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:73
msgid "IP"
@@ -807,10 +806,10 @@ msgstr "IP"
#: assets/templates/assets/_asset_user_list.html:19
#: assets/templates/assets/asset_detail.html:58
#: assets/templates/assets/asset_list.html:96
#: assets/templates/assets/user_asset_list.html:48
#: assets/templates/assets/user_asset_list.html:75
#: perms/templates/perms/asset_permission_asset.html:57
#: perms/templates/perms/asset_permission_list.html:73 settings/forms.py:143
#: users/templates/users/_granted_assets.html:25
#: users/templates/users/_granted_assets.html:30
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:53
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:72
msgid "Hostname"
@@ -822,18 +821,19 @@ msgstr "主机名"
#: assets/templates/assets/system_user_detail.html:70
#: assets/templates/assets/system_user_list.html:53
#: terminal/templates/terminal/session_list.html:31
#: terminal/templates/terminal/session_list.html:75
msgid "Protocol"
msgstr "协议"
#: assets/models/asset.py:142 assets/serializers/asset.py:68
#: assets/templates/assets/asset_create.html:24
#: assets/templates/assets/user_asset_list.html:50
#: assets/templates/assets/user_asset_list.html:77
#: perms/serializers/user_permission.py:48
msgid "Protocols"
msgstr "协议组"
#: assets/models/asset.py:143 assets/templates/assets/asset_detail.html:102
#: assets/templates/assets/user_asset_list.html:51
#: assets/templates/assets/user_asset_list.html:78
msgid "Platform"
msgstr "系统平台"
@@ -940,7 +940,8 @@ msgid "SSH public key"
msgstr "ssh公钥"
#: assets/models/base.py:35 assets/models/gathered_user.py:21
#: assets/templates/assets/cmd_filter_detail.html:73 ops/models/adhoc.py:46
#: assets/templates/assets/cmd_filter_detail.html:73 common/mixins/models.py:52
#: ops/models/adhoc.py:46
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:109
#: xpack/plugins/gathered_user/templates/gathered_user/gathered_user_list.html:76
msgid "Date updated"
@@ -1107,9 +1108,9 @@ msgstr "默认资产组"
#: terminal/models.py:156 terminal/templates/terminal/command_list.html:29
#: terminal/templates/terminal/command_list.html:65
#: terminal/templates/terminal/session_list.html:27
#: terminal/templates/terminal/session_list.html:71 users/forms.py:312
#: terminal/templates/terminal/session_list.html:71 users/forms.py:319
#: users/models/user.py:127 users/models/user.py:143 users/models/user.py:500
#: users/serializers/v1.py:130 users/templates/users/user_group_detail.html:78
#: users/serializers/v1.py:132 users/templates/users/user_group_detail.html:78
#: users/templates/users/user_group_list.html:36 users/views/user.py:250
#: xpack/plugins/orgs/forms.py:28
#: xpack/plugins/orgs/templates/orgs/org_detail.html:113
@@ -1117,7 +1118,7 @@ msgstr "默认资产组"
msgid "User"
msgstr "用户"
#: assets/models/label.py:19 assets/models/node.py:400
#: assets/models/label.py:19 assets/models/node.py:412
#: assets/templates/assets/label_list.html:15 settings/models.py:30
msgid "Value"
msgstr "值"
@@ -1138,7 +1139,11 @@ msgstr "未分组"
msgid "empty"
msgstr "空"
#: assets/models/node.py:399
#: assets/models/node.py:328
msgid "favorite"
msgstr "收藏夹"
#: assets/models/node.py:411
msgid "Key"
msgstr "键"
@@ -1192,7 +1197,7 @@ msgstr "Shell"
msgid "Login mode"
msgstr "登录模式"
#: assets/models/user.py:162 assets/templates/assets/user_asset_list.html:52
#: assets/models/user.py:162 assets/templates/assets/user_asset_list.html:79
#: audits/models.py:20 audits/templates/audits/ftp_log_list.html:52
#: audits/templates/audits/ftp_log_list.html:75
#: perms/forms/asset_permission.py:86 perms/forms/remote_app_permission.py:43
@@ -1208,7 +1213,7 @@ msgstr "登录模式"
#: terminal/templates/terminal/command_list.html:67
#: terminal/templates/terminal/session_list.html:29
#: terminal/templates/terminal/session_list.html:73
#: users/templates/users/_granted_assets.html:27
#: users/templates/users/_granted_assets.html:32
#: xpack/plugins/orgs/templates/orgs/org_list.html:20
msgid "System user"
msgstr "系统用户"
@@ -1258,7 +1263,7 @@ msgstr "组织名称"
msgid "Backend"
msgstr "后端"
#: assets/serializers/asset_user.py:67 users/forms.py:263
#: assets/serializers/asset_user.py:67 users/forms.py:262
#: users/models/user.py:403 users/templates/users/first_login.html:42
#: users/templates/users/user_password_update.html:49
#: users/templates/users/user_profile.html:69
@@ -1872,6 +1877,7 @@ msgstr "删除选择资产"
#: users/templates/users/user_group_list.html:118
#: users/templates/users/user_list.html:254
#: xpack/plugins/interface/templates/interface/interface.html:101
#: xpack/plugins/orgs/templates/orgs/org_create_update.html:33
msgid "Cancel"
msgstr "取消"
@@ -2257,7 +2263,7 @@ msgstr "Agent"
#: audits/models.py:85 audits/templates/audits/login_log_list.html:62
#: authentication/templates/authentication/_mfa_confirm_modal.html:14
#: users/forms.py:175 users/models/user.py:395
#: users/forms.py:174 users/models/user.py:395
#: users/templates/users/first_login.html:45
msgid "MFA"
msgstr "MFA"
@@ -2480,7 +2486,7 @@ msgid ""
"after {} minutes)"
msgstr "账号已被锁定(请联系管理员解锁 或 {}分钟后重试)"
#: authentication/forms.py:66 users/forms.py:22
#: authentication/forms.py:66 users/forms.py:21
msgid "MFA code"
msgstr "MFA 验证码"
@@ -2505,7 +2511,7 @@ msgid "Secret"
msgstr "密文"
#: authentication/templates/authentication/_access_key_modal.html:48
#: users/templates/users/_granted_assets.html:75
#: users/templates/users/_granted_assets.html:80
msgid "Show"
msgstr "显示"
@@ -2713,11 +2719,11 @@ msgstr ""
msgid "Encrypt field using Secret Key"
msgstr ""
#: common/mixins/models.py:31
#: common/mixins/models.py:34
msgid "is discard"
msgstr ""
#: common/mixins/models.py:32
#: common/mixins/models.py:35
msgid "discard time"
msgstr ""
@@ -3105,7 +3111,7 @@ msgstr "命令执行列表"
msgid "Command execution"
msgstr "命令执行"
#: orgs/mixins/models.py:61 orgs/mixins/serializers.py:26 orgs/models.py:31
#: orgs/mixins/models.py:58 orgs/mixins/serializers.py:26 orgs/models.py:31
msgid "Organization"
msgstr "组织"
@@ -3122,7 +3128,7 @@ msgstr "空"
#: perms/templates/perms/asset_permission_list.html:71
#: perms/templates/perms/asset_permission_list.html:118
#: perms/templates/perms/remote_app_permission_list.html:16
#: templates/_nav.html:21 users/forms.py:286 users/models/group.py:26
#: templates/_nav.html:21 users/forms.py:293 users/models/group.py:26
#: users/models/user.py:379 users/templates/users/_select_user_modal.html:16
#: users/templates/users/user_detail.html:218
#: users/templates/users/user_list.html:38
@@ -3969,7 +3975,7 @@ msgid "Commercial support"
msgstr "商业支持"
#: templates/_header_bar.html:70 templates/_nav.html:30
#: templates/_nav_user.html:32 users/forms.py:154
#: templates/_nav_user.html:32 users/forms.py:153
#: users/templates/users/_user.html:43
#: users/templates/users/first_login.html:39
#: users/templates/users/user_password_update.html:40
@@ -4390,7 +4396,7 @@ msgstr "线程数"
msgid "Boot Time"
msgstr "运行时间"
#: terminal/models.py:162 terminal/templates/terminal/session_list.html:136
#: terminal/models.py:162 terminal/templates/terminal/session_list.html:137
msgid "Replay"
msgstr "回放"
@@ -4456,15 +4462,15 @@ msgstr "终断所选"
msgid "Confirm finished"
msgstr "确认已完成"
#: terminal/templates/terminal/session_list.html:91
#: terminal/templates/terminal/session_list.html:92
msgid "Terminate task send, waiting ..."
msgstr "终断任务已发送,请等待"
#: terminal/templates/terminal/session_list.html:142
#: terminal/templates/terminal/session_list.html:143
msgid "Terminate"
msgstr "终断"
#: terminal/templates/terminal/session_list.html:173
#: terminal/templates/terminal/session_list.html:174
msgid "Finish session success"
msgstr "标记会话完成成功"
@@ -4534,7 +4540,7 @@ msgstr "你可以使用ssh客户端工具连接终端"
msgid "Could not reset self otp, use profile reset instead"
msgstr "不能再该页面重置MFA, 请去个人信息页面重置"
#: users/forms.py:33 users/models/user.py:383
#: users/forms.py:32 users/models/user.py:383
#: users/templates/users/_select_user_modal.html:15
#: users/templates/users/user_detail.html:87
#: users/templates/users/user_list.html:37
@@ -4542,44 +4548,44 @@ msgstr "不能再该页面重置MFA, 请去个人信息页面重置"
msgid "Role"
msgstr "角色"
#: users/forms.py:36 users/forms.py:233
#: users/forms.py:35 users/forms.py:232
#: users/templates/users/user_update.html:30
msgid "ssh public key"
msgstr "ssh公钥"
#: users/forms.py:37 users/forms.py:234
#: users/forms.py:36 users/forms.py:233
msgid "ssh-rsa AAAA..."
msgstr ""
#: users/forms.py:38
#: users/forms.py:37
msgid "Paste user id_rsa.pub here."
msgstr "复制用户公钥到这里"
#: users/forms.py:52 users/templates/users/user_detail.html:226
#: users/forms.py:51 users/templates/users/user_detail.html:226
msgid "Join user groups"
msgstr "添加到用户组"
#: users/forms.py:87 users/forms.py:248
#: users/forms.py:86 users/forms.py:247
msgid "Public key should not be the same as your old one."
msgstr "不能和原来的密钥相同"
#: users/forms.py:91 users/forms.py:252 users/serializers/v1.py:116
#: users/forms.py:90 users/forms.py:251 users/serializers/v1.py:116
msgid "Not a valid ssh public key"
msgstr "ssh密钥不合法"
#: users/forms.py:104 users/views/login.py:114 users/views/user.py:287
#: users/forms.py:103 users/views/login.py:114 users/views/user.py:287
msgid "* Your password does not meet the requirements"
msgstr "* 您的密码不符合要求"
#: users/forms.py:125
#: users/forms.py:124
msgid "Reset link will be generated and sent to the user"
msgstr "生成重置密码链接,通过邮件发送给用户"
#: users/forms.py:126
#: users/forms.py:125
msgid "Set password"
msgstr "设置密码"
#: users/forms.py:133 xpack/plugins/change_auth_plan/models.py:88
#: users/forms.py:132 xpack/plugins/change_auth_plan/models.py:88
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:51
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:69
#: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:57
@@ -4587,7 +4593,7 @@ msgstr "设置密码"
msgid "Password strategy"
msgstr "密码策略"
#: users/forms.py:160
#: users/forms.py:159
msgid ""
"When enabled, you will enter the MFA binding process the next time you log "
"in. you can also directly bind in \"personal information -> quick "
@@ -4596,11 +4602,11 @@ msgstr ""
"启用之后您将会在下次登录时进入MFA绑定流程您也可以在个人信息->快速修改->更"
"改MFA设置中直接绑定"
#: users/forms.py:170
#: users/forms.py:169
msgid "* Enable MFA authentication to make the account more secure."
msgstr "* 启用MFA认证使账号更加安全。"
#: users/forms.py:180
#: users/forms.py:179
msgid ""
"In order to protect you and your company, please keep your account, password "
"and key sensitive information properly. (for example: setting complex "
@@ -4609,41 +4615,41 @@ msgstr ""
"为了保护您和公司的安全,请妥善保管您的账户、密码和密钥等重要敏感信息;(如:"
"设置复杂密码启用MFA认证"
#: users/forms.py:187 users/templates/users/first_login.html:48
#: users/forms.py:186 users/templates/users/first_login.html:48
#: users/templates/users/first_login.html:110
#: users/templates/users/first_login.html:139
msgid "Finish"
msgstr "完成"
#: users/forms.py:193
#: users/forms.py:192
msgid "Old password"
msgstr "原来密码"
#: users/forms.py:198
#: users/forms.py:197
msgid "New password"
msgstr "新密码"
#: users/forms.py:203
#: users/forms.py:202
msgid "Confirm password"
msgstr "确认密码"
#: users/forms.py:213
#: users/forms.py:212
msgid "Old password error"
msgstr "原来密码错误"
#: users/forms.py:221
#: users/forms.py:220
msgid "Password does not match"
msgstr "密码不一致"
#: users/forms.py:231
#: users/forms.py:230
msgid "Automatically configure and download the SSH key"
msgstr "自动配置并下载SSH密钥"
#: users/forms.py:235
#: users/forms.py:234
msgid "Paste your id_rsa.pub here."
msgstr "复制你的公钥到这里"
#: users/forms.py:269 users/forms.py:274 users/forms.py:316
#: users/forms.py:268 users/forms.py:273 users/forms.py:323
#: xpack/plugins/orgs/forms.py:18
msgid "Select users"
msgstr "选择用户"
@@ -4736,7 +4742,7 @@ msgstr "角色只能为 {}"
msgid "Password does not match security rules"
msgstr "密码不满足安全规则"
#: users/serializers/v1.py:147
#: users/serializers/v1.py:157
msgid "Auditors cannot be join in the user group"
msgstr "审计员不能被加入到用户组"
@@ -5933,7 +5939,7 @@ msgstr "更新同步实例任务"
#: xpack/plugins/gathered_user/views.py:21
#: xpack/plugins/gathered_user/views.py:34
#: xpack/plugins/gathered_user/views.py:49
#: xpack/plugins/gathered_user/views.py:66
#: xpack/plugins/gathered_user/views.py:69
msgid "Gathered user"
msgstr "收集用户"
@@ -5968,7 +5974,7 @@ msgstr "创建任务"
msgid "Gathered user list"
msgstr "收集用户列表"
#: xpack/plugins/gathered_user/views.py:67
#: xpack/plugins/gathered_user/views.py:70
msgid "Update task"
msgstr "更新任务"