diff --git a/apps/jumpserver/conf.py b/apps/jumpserver/conf.py index 91f3da1cb..179376828 100644 --- a/apps/jumpserver/conf.py +++ b/apps/jumpserver/conf.py @@ -222,7 +222,6 @@ class Config(dict): 'TERMINAL_PASSWORD_AUTH': True, 'TERMINAL_PUBLIC_KEY_AUTH': True, - 'TERMINAL_ONLY_SOURCE_LOCAL_CAN_PUBLIC_KEY_AUTH': True, 'TERMINAL_HEARTBEAT_INTERVAL': 20, 'TERMINAL_ASSET_LIST_SORT_BY': 'hostname', 'TERMINAL_ASSET_LIST_PAGE_SIZE': 'auto', diff --git a/apps/jumpserver/settings/custom.py b/apps/jumpserver/settings/custom.py index 31b5d52ac..936b27582 100644 --- a/apps/jumpserver/settings/custom.py +++ b/apps/jumpserver/settings/custom.py @@ -124,4 +124,3 @@ FORGOT_PASSWORD_URL = CONFIG.FORGOT_PASSWORD_URL # 自定义默认组织名 GLOBAL_ORG_DISPLAY_NAME = CONFIG.GLOBAL_ORG_DISPLAY_NAME HEALTH_CHECK_TOKEN = CONFIG.HEALTH_CHECK_TOKEN -TERMINAL_ONLY_SOURCE_LOCAL_CAN_PUBLIC_KEY_AUTH = CONFIG.TERMINAL_ONLY_SOURCE_LOCAL_CAN_PUBLIC_KEY_AUTH diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 4e146d83b..78b235d0e 100644 Binary files a/apps/locale/zh/LC_MESSAGES/django.mo and b/apps/locale/zh/LC_MESSAGES/django.mo differ diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 49694c4a0..e24c71c54 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-04-14 17:52+0800\n" +"POT-Creation-Date: 2021-04-26 10:14+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -25,20 +25,11 @@ msgstr "" #: orgs/models.py:23 perms/models/base.py:49 settings/models.py:29 #: terminal/models/storage.py:23 terminal/models/storage.py:90 #: terminal/models/task.py:16 terminal/models/terminal.py:100 -#: users/forms/profile.py:32 users/models/group.py:15 users/models/user.py:530 +#: users/forms/profile.py:32 users/models/group.py:15 users/models/user.py:535 #: users/templates/users/_select_user_modal.html:13 #: users/templates/users/user_asset_permission.html:37 #: users/templates/users/user_asset_permission.html:154 #: users/templates/users/user_database_app_permission.html:36 -#: users/templates/users/user_detail.html:49 -#: users/templates/users/user_granted_database_app.html:34 -#: users/templates/users/user_granted_remote_app.html:34 -#: users/templates/users/user_group_detail.html:50 -#: users/templates/users/user_group_list.html:14 -#: users/templates/users/user_list.html:14 -#: users/templates/users/user_profile.html:51 -#: users/templates/users/user_pubkey_update.html:57 -#: users/templates/users/user_remote_app_permission.html:36 #: xpack/plugins/cloud/models.py:28 msgid "Name" msgstr "名称" @@ -56,8 +47,6 @@ msgstr "优先级可选范围为 1-100 (数值越小越优先)" #: acls/models/base.py:31 authentication/models.py:20 #: authentication/templates/authentication/_access_key_modal.html:32 #: perms/models/base.py:52 users/templates/users/_select_user_modal.html:18 -#: users/templates/users/user_detail.html:132 -#: users/templates/users/user_profile.html:63 msgid "Active" msgstr "激活中" @@ -72,13 +61,7 @@ msgstr "激活中" #: orgs/models.py:26 perms/models/base.py:57 settings/models.py:34 #: terminal/models/storage.py:29 terminal/models/storage.py:96 #: terminal/models/terminal.py:114 tickets/models/ticket.py:73 -#: users/models/group.py:16 users/models/user.py:563 -#: users/templates/users/user_detail.html:115 -#: users/templates/users/user_granted_database_app.html:38 -#: users/templates/users/user_granted_remote_app.html:37 -#: users/templates/users/user_group_detail.html:62 -#: users/templates/users/user_group_list.html:16 -#: users/templates/users/user_profile.html:138 +#: users/models/group.py:16 users/models/user.py:568 #: xpack/plugins/change_auth_plan/models.py:77 xpack/plugins/cloud/models.py:35 #: xpack/plugins/cloud/models.py:98 xpack/plugins/gathered_user/models.py:26 msgid "Comment" @@ -104,9 +87,6 @@ msgstr "登录IP" #: users/templates/users/user_asset_permission.html:44 #: users/templates/users/user_asset_permission.html:79 #: users/templates/users/user_database_app_permission.html:42 -#: users/templates/users/user_group_list.html:17 -#: users/templates/users/user_list.html:20 -#: users/templates/users/user_remote_app_permission.html:42 msgid "Action" msgstr "动作" @@ -118,22 +98,17 @@ msgstr "动作" #: perms/models/base.py:50 templates/index.html:78 #: terminal/backends/command/models.py:18 #: terminal/backends/command/serializers.py:12 terminal/models/session.py:37 -#: tickets/models/comment.py:17 users/models/user.py:159 -#: users/models/user.py:707 users/serializers/group.py:20 +#: tickets/models/comment.py:17 users/models/user.py:164 +#: users/models/user.py:712 users/serializers/group.py:20 #: users/templates/users/user_asset_permission.html:38 #: users/templates/users/user_asset_permission.html:64 #: users/templates/users/user_database_app_permission.html:37 #: users/templates/users/user_database_app_permission.html:58 -#: users/templates/users/user_group_detail.html:73 -#: users/templates/users/user_group_list.html:15 -#: users/templates/users/user_list.html:135 -#: users/templates/users/user_remote_app_permission.html:37 -#: users/templates/users/user_remote_app_permission.html:58 msgid "User" msgstr "用户" #: acls/models/login_asset_acl.py:17 authentication/models.py:72 -#: tickets/const.py:9 users/templates/users/user_detail.html:250 +#: tickets/const.py:9 msgid "Login confirm" msgstr "登录复核" @@ -152,18 +127,16 @@ msgstr "系统用户" #: terminal/backends/command/serializers.py:13 terminal/models/session.py:39 #: users/templates/users/user_asset_permission.html:40 #: users/templates/users/user_asset_permission.html:70 -#: users/templates/users/user_granted_remote_app.html:36 #: xpack/plugins/change_auth_plan/models.py:282 #: xpack/plugins/cloud/models.py:202 msgid "Asset" msgstr "资产" #: acls/models/login_asset_acl.py:32 authentication/models.py:45 -#: users/templates/users/user_detail.html:258 msgid "Reviewers" msgstr "审批人" -#: acls/models/login_asset_acl.py:86 tickets/const.py:12 +#: acls/models/login_asset_acl.py:89 tickets/const.py:12 msgid "Login asset confirm" msgstr "登录资产复核" @@ -205,11 +178,8 @@ msgstr "格式为逗号分隔的字符串, * 表示匹配所有. " #: applications/serializers/attrs/application_type/vmware_client.py:26 #: assets/models/base.py:251 assets/models/gathered_user.py:15 #: audits/models.py:100 authentication/forms.py:15 authentication/forms.py:17 -#: ops/models/adhoc.py:148 users/forms/profile.py:31 users/models/user.py:528 +#: ops/models/adhoc.py:148 users/forms/profile.py:31 users/models/user.py:533 #: users/templates/users/_select_user_modal.html:14 -#: users/templates/users/user_detail.html:53 -#: users/templates/users/user_list.html:15 -#: users/templates/users/user_profile.html:47 #: xpack/plugins/change_auth_plan/models.py:47 #: xpack/plugins/change_auth_plan/models.py:278 #: xpack/plugins/cloud/serializers.py:51 @@ -261,7 +231,6 @@ msgstr "所有复核人都不属于组织 `{}`" #: applications/const.py:9 #: applications/serializers/attrs/application_category/db.py:14 #: applications/serializers/attrs/application_type/mysql_workbench.py:26 -#: users/templates/users/user_granted_database_app.html:37 msgid "Database" msgstr "数据库" @@ -288,7 +257,6 @@ msgstr "类别" #: terminal/models/storage.py:26 terminal/models/storage.py:93 #: tickets/models/ticket.py:38 #: tickets/serializers/ticket/meta/ticket_type/apply_application.py:27 -#: users/templates/users/user_granted_database_app.html:35 msgid "Type" msgstr "类型" @@ -315,9 +283,7 @@ msgid "Cluster" msgstr "集群" #: applications/serializers/attrs/application_category/db.py:11 -#: ops/models/adhoc.py:146 -#: users/templates/users/user_granted_database_app.html:36 -#: xpack/plugins/cloud/serializers.py:49 +#: ops/models/adhoc.py:146 xpack/plugins/cloud/serializers.py:49 msgid "Host" msgstr "主机" @@ -348,14 +314,12 @@ msgstr "目标URL" #: applications/serializers/attrs/application_type/mysql_workbench.py:34 #: applications/serializers/attrs/application_type/vmware_client.py:30 #: assets/models/base.py:252 assets/serializers/asset_user.py:71 -#: audits/signals_handler.py:46 authentication/forms.py:22 +#: audits/signals_handler.py:58 authentication/forms.py:22 #: authentication/templates/authentication/login.html:155 #: settings/serializers/settings.py:93 users/forms/profile.py:21 #: users/templates/users/user_otp_check_password.html:13 #: users/templates/users/user_password_update.html:43 #: users/templates/users/user_password_verify.html:18 -#: users/templates/users/user_profile_update.html:41 -#: users/templates/users/user_pubkey_update.html:41 #: users/templates/users/user_update.html:20 #: xpack/plugins/change_auth_plan/models.py:68 #: xpack/plugins/change_auth_plan/models.py:190 @@ -518,9 +482,8 @@ msgstr "标签管理" #: assets/models/cluster.py:28 assets/models/cmd_filter.py:26 #: assets/models/cmd_filter.py:60 assets/models/group.py:21 #: common/db/models.py:70 common/mixins/models.py:49 orgs/models.py:24 -#: orgs/models.py:422 perms/models/base.py:55 users/models/user.py:571 -#: users/serializers/group.py:35 users/templates/users/user_detail.html:97 -#: xpack/plugins/change_auth_plan/models.py:81 +#: orgs/models.py:422 perms/models/base.py:55 users/models/user.py:576 +#: users/serializers/group.py:35 xpack/plugins/change_auth_plan/models.py:81 #: xpack/plugins/cloud/models.py:104 xpack/plugins/gathered_user/models.py:30 msgid "Created by" msgstr "创建者" @@ -533,7 +496,6 @@ msgstr "创建者" #: assets/models/label.py:25 common/db/models.py:72 common/mixins/models.py:50 #: ops/models/adhoc.py:38 ops/models/command.py:29 orgs/models.py:25 #: orgs/models.py:420 perms/models/base.py:56 users/models/group.py:18 -#: users/templates/users/user_group_detail.html:58 #: xpack/plugins/cloud/models.py:107 msgid "Date created" msgstr "创建日期" @@ -580,8 +542,7 @@ msgstr "带宽" msgid "Contact" msgstr "联系人" -#: assets/models/cluster.py:22 users/models/user.py:549 -#: users/templates/users/user_detail.html:62 +#: assets/models/cluster.py:22 users/models/user.py:554 msgid "Phone" msgstr "手机" @@ -607,7 +568,7 @@ msgid "Default" msgstr "默认" #: assets/models/cluster.py:36 assets/models/label.py:14 -#: users/models/user.py:719 +#: users/models/user.py:724 msgid "System" msgstr "系统" @@ -734,8 +695,7 @@ msgstr "资产" msgid "Users" msgstr "用户管理" -#: assets/models/user.py:121 users/templates/users/user_group_list.html:90 -#: users/templates/users/user_profile.html:124 +#: assets/models/user.py:121 msgid "User groups" msgstr "用户组" @@ -782,8 +742,6 @@ msgstr "用户组" #: users/templates/users/user_asset_permission.html:159 #: users/templates/users/user_database_app_permission.html:40 #: users/templates/users/user_database_app_permission.html:67 -#: users/templates/users/user_remote_app_permission.html:40 -#: users/templates/users/user_remote_app_permission.html:67 msgid "System user" msgstr "系统用户" @@ -847,14 +805,11 @@ msgid "Backend" msgstr "后端" #: assets/serializers/asset_user.py:75 users/forms/profile.py:160 -#: users/models/user.py:560 users/templates/users/user_password_update.html:48 -#: users/templates/users/user_profile.html:69 -#: users/templates/users/user_profile_update.html:46 -#: users/templates/users/user_pubkey_update.html:46 +#: users/models/user.py:565 users/templates/users/user_password_update.html:48 msgid "Public key" msgstr "SSH公钥" -#: assets/serializers/asset_user.py:79 users/models/user.py:557 +#: assets/serializers/asset_user.py:79 users/models/user.py:562 msgid "Private key" msgstr "ssh私钥" @@ -984,25 +939,25 @@ msgid "" "The task of self-checking is already running and cannot be started repeatedly" msgstr "自检程序已经在运行,不能重复启动" -#: assets/tasks/push_system_user.py:192 +#: assets/tasks/push_system_user.py:193 #: assets/tasks/system_user_connectivity.py:89 msgid "System user is dynamic: {}" msgstr "系统用户是动态的: {}" -#: assets/tasks/push_system_user.py:232 +#: assets/tasks/push_system_user.py:233 msgid "Start push system user for platform: [{}]" msgstr "推送系统用户到平台: [{}]" -#: assets/tasks/push_system_user.py:233 +#: assets/tasks/push_system_user.py:234 #: assets/tasks/system_user_connectivity.py:81 msgid "Hosts count: {}" msgstr "主机数量: {}" -#: assets/tasks/push_system_user.py:272 assets/tasks/push_system_user.py:298 +#: assets/tasks/push_system_user.py:273 assets/tasks/push_system_user.py:299 msgid "Push system users to assets: {}" msgstr "推送系统用户到入资产: {}" -#: assets/tasks/push_system_user.py:284 +#: assets/tasks/push_system_user.py:285 msgid "Push system users to asset: {}({}) => {}" msgstr "推送系统用户到入资产: {}({}) => {}" @@ -1042,12 +997,6 @@ msgstr "没有匹配到资产,结束任务" #: authentication/templates/authentication/_access_key_modal.html:65 #: users/templates/users/user_asset_permission.html:128 #: users/templates/users/user_database_app_permission.html:111 -#: users/templates/users/user_detail.html:16 -#: users/templates/users/user_group_detail.html:27 -#: users/templates/users/user_group_list.html:53 -#: users/templates/users/user_list.html:94 -#: users/templates/users/user_list.html:98 -#: users/templates/users/user_remote_app_permission.html:111 msgid "Delete" msgstr "删除" @@ -1089,7 +1038,6 @@ msgid "Filename" msgstr "文件名" #: audits/models.py:42 audits/models.py:96 -#: users/templates/users/user_detail.html:487 msgid "Success" msgstr "成功" @@ -1114,15 +1062,6 @@ msgstr "创建" #: templates/_csv_update_modal.html:6 #: users/templates/users/user_asset_permission.html:127 #: users/templates/users/user_database_app_permission.html:110 -#: users/templates/users/user_detail.html:12 -#: users/templates/users/user_group_detail.html:23 -#: users/templates/users/user_group_list.html:51 -#: users/templates/users/user_list.html:84 -#: users/templates/users/user_list.html:87 -#: users/templates/users/user_profile.html:181 -#: users/templates/users/user_profile.html:191 -#: users/templates/users/user_profile.html:201 -#: users/templates/users/user_remote_app_permission.html:110 msgid "Update" msgstr "更新" @@ -1142,12 +1081,11 @@ msgstr "日期" msgid "Change by" msgstr "修改者" -#: audits/models.py:90 users/templates/users/user_detail.html:84 +#: audits/models.py:90 msgid "Disabled" msgstr "禁用" #: audits/models.py:91 settings/models.py:33 -#: users/templates/users/user_detail.html:82 msgid "Enabled" msgstr "启用" @@ -1180,9 +1118,8 @@ msgstr "用户代理" #: audits/models.py:105 #: authentication/templates/authentication/_mfa_confirm_modal.html:14 #: authentication/templates/authentication/login_otp.html:6 -#: users/forms/profile.py:64 users/models/user.py:552 -#: users/serializers/profile.py:99 users/templates/users/user_detail.html:77 -#: users/templates/users/user_profile.html:87 +#: users/forms/profile.py:64 users/models/user.py:557 +#: users/serializers/profile.py:99 msgid "MFA" msgstr "多因子认证" @@ -1250,11 +1187,11 @@ msgstr "运行用户(显示名称)" msgid "User for display" msgstr "用户(显示名称)" -#: audits/signals_handler.py:45 +#: audits/signals_handler.py:57 msgid "SSH Key" msgstr "SSH 密钥" -#: audits/signals_handler.py:47 +#: audits/signals_handler.py:59 msgid "SSO" msgstr "" @@ -1465,18 +1402,13 @@ msgid "Show" msgstr "显示" #: authentication/templates/authentication/_access_key_modal.html:66 -#: users/models/user.py:445 users/serializers/profile.py:96 -#: users/templates/users/user_profile.html:94 -#: users/templates/users/user_profile.html:163 -#: users/templates/users/user_profile.html:166 +#: users/models/user.py:450 users/serializers/profile.py:96 #: users/templates/users/user_verify_mfa.html:32 msgid "Disable" msgstr "禁用" #: authentication/templates/authentication/_access_key_modal.html:67 -#: users/models/user.py:446 users/serializers/profile.py:97 -#: users/templates/users/user_profile.html:92 -#: users/templates/users/user_profile.html:170 +#: users/models/user.py:451 users/serializers/profile.py:97 msgid "Enable" msgstr "启用" @@ -1508,14 +1440,7 @@ msgid "Need MFA for view auth" msgstr "需要多因子认证来查看账号信息" #: authentication/templates/authentication/_mfa_confirm_modal.html:20 -#: templates/_modal.html:23 users/templates/users/user_detail.html:264 -#: users/templates/users/user_detail.html:417 -#: users/templates/users/user_detail.html:443 -#: users/templates/users/user_detail.html:466 -#: users/templates/users/user_detail.html:511 -#: users/templates/users/user_group_create_update.html:28 -#: users/templates/users/user_list.html:184 -#: users/templates/users/user_password_verify.html:20 +#: templates/_modal.html:23 users/templates/users/user_password_verify.html:20 msgid "Confirm" msgstr "确认" @@ -1826,7 +1751,7 @@ msgstr "再次执行" msgid "Become" msgstr "Become" -#: ops/models/adhoc.py:150 users/templates/users/user_group_detail.html:54 +#: ops/models/adhoc.py:150 msgid "Create by" msgstr "创建者" @@ -1936,11 +1861,8 @@ msgstr "组织审计员" msgid "GLOBAL" msgstr "全局组织" -#: orgs/models.py:419 users/models/user.py:540 +#: orgs/models.py:419 users/models/user.py:545 #: users/templates/users/_select_user_modal.html:15 -#: users/templates/users/user_detail.html:73 -#: users/templates/users/user_list.html:16 -#: users/templates/users/user_profile.html:55 msgid "Role" msgstr "角色" @@ -1952,7 +1874,7 @@ msgstr "管理员正在修改授权,请稍等" msgid "The authorization cannot be revoked for the time being" msgstr "该授权暂时不能撤销" -#: perms/models/application_permission.py:27 users/models/user.py:160 +#: perms/models/application_permission.py:27 users/models/user.py:165 msgid "Application" msgstr "应用程序" @@ -2011,15 +1933,11 @@ msgid "Favorite" msgstr "收藏夹" #: perms/models/base.py:51 templates/_nav.html:21 users/models/group.py:31 -#: users/models/user.py:536 users/templates/users/_select_user_modal.html:16 +#: users/models/user.py:541 users/templates/users/_select_user_modal.html:16 #: users/templates/users/user_asset_permission.html:39 #: users/templates/users/user_asset_permission.html:67 #: users/templates/users/user_database_app_permission.html:38 #: users/templates/users/user_database_app_permission.html:61 -#: users/templates/users/user_detail.html:209 -#: users/templates/users/user_list.html:17 -#: users/templates/users/user_remote_app_permission.html:38 -#: users/templates/users/user_remote_app_permission.html:61 msgid "User group" msgstr "用户组" @@ -2028,8 +1946,7 @@ msgstr "用户组" #: tickets/serializers/ticket/meta/ticket_type/apply_application.py:77 #: tickets/serializers/ticket/meta/ticket_type/apply_asset.py:43 #: tickets/serializers/ticket/meta/ticket_type/apply_asset.py:81 -#: users/models/user.py:568 users/templates/users/user_detail.html:93 -#: users/templates/users/user_profile.html:120 +#: users/models/user.py:573 msgid "Date expired" msgstr "失效日期" @@ -2041,11 +1958,11 @@ msgstr "应用列表中包含与授权类型不同的应用。({})" #: perms/serializers/asset/permission.py:43 #: perms/serializers/asset/permission.py:61 users/serializers/user.py:34 -#: users/serializers/user.py:69 +#: users/serializers/user.py:70 msgid "Is expired" msgstr "是否过期" -#: perms/serializers/asset/permission.py:62 users/serializers/user.py:68 +#: perms/serializers/asset/permission.py:62 users/serializers/user.py:69 msgid "Is valid" msgstr "账户是否有效" @@ -2079,7 +1996,6 @@ msgid "Imported {} users successfully" msgstr "导入 {} 个用户成功" #: settings/models.py:123 users/templates/users/reset_password.html:29 -#: users/templates/users/user_profile.html:20 msgid "Setting" msgstr "设置" @@ -2262,23 +2178,29 @@ msgstr "自动" msgid "Password auth" msgstr "密码认证" -#: settings/serializers/settings.py:124 +#: settings/serializers/settings.py:125 msgid "Public key auth" msgstr "密钥认证" -#: settings/serializers/settings.py:125 +#: settings/serializers/settings.py:126 +msgid "" +"Tips: If use other auth method, like AD/LDAP, you should disable this to " +"avoid being able to log in after deleting" +msgstr "提示:如果你使用其它认证方式,如 AD/LDAP,你应该禁用此项,以避免第三方系统删除后,还可以登录" + +#: settings/serializers/settings.py:129 msgid "List sort by" msgstr "资产列表排序" -#: settings/serializers/settings.py:126 +#: settings/serializers/settings.py:130 msgid "List page size" msgstr "资产列表每页数量" -#: settings/serializers/settings.py:128 +#: settings/serializers/settings.py:132 msgid "Session keep duration" msgstr "会话日志保存时间" -#: settings/serializers/settings.py:129 +#: settings/serializers/settings.py:133 msgid "" "Units: days, Session, record, command will be delete if more than duration, " "only in database" @@ -2286,64 +2208,64 @@ msgstr "" "单位:天。 会话、录像、命令记录超过该时长将会被删除(仅影响数据库存储, oss等不" "受影响)" -#: settings/serializers/settings.py:131 +#: settings/serializers/settings.py:135 msgid "Telnet login regex" msgstr "Telnet 成功正则表达式" -#: settings/serializers/settings.py:136 +#: settings/serializers/settings.py:140 msgid "Global MFA auth" msgstr "全局启用 MFA 认证" -#: settings/serializers/settings.py:137 +#: settings/serializers/settings.py:141 msgid "All user enable MFA" msgstr "强制所有用户启用多因子认证" -#: settings/serializers/settings.py:140 +#: settings/serializers/settings.py:144 msgid "Batch command execution" msgstr "批量命令执行" -#: settings/serializers/settings.py:141 +#: settings/serializers/settings.py:145 msgid "Allow user run batch command or not using ansible" msgstr "是否允许用户使用 ansible 执行批量命令" -#: settings/serializers/settings.py:144 +#: settings/serializers/settings.py:148 msgid "Enable terminal register" msgstr "终端注册" -#: settings/serializers/settings.py:145 +#: settings/serializers/settings.py:149 msgid "" "Allow terminal register, after all terminal setup, you should disable this " "for security" msgstr "是否允许终端注册,当所有终端启动后,为了安全应该关闭" -#: settings/serializers/settings.py:149 +#: settings/serializers/settings.py:153 msgid "Limit the number of login failures" msgstr "限制登录失败次数" -#: settings/serializers/settings.py:153 +#: settings/serializers/settings.py:157 msgid "Block logon interval" msgstr "禁止登录时间间隔" -#: settings/serializers/settings.py:154 +#: settings/serializers/settings.py:158 msgid "" "Tip: (unit/minute) if the user has failed to log in for a limited number of " "times, no login is allowed during this time interval." msgstr "" "提示:(单位:分)当用户登录失败次数达到限制后,那么在此时间间隔内禁止登录" -#: settings/serializers/settings.py:158 +#: settings/serializers/settings.py:162 msgid "Connection max idle time" msgstr "连接最大空闲时间" -#: settings/serializers/settings.py:159 +#: settings/serializers/settings.py:163 msgid "If idle time more than it, disconnect connection Unit: minute" msgstr "提示:如果超过该配置没有操作,连接会被断开 (单位:分)" -#: settings/serializers/settings.py:163 +#: settings/serializers/settings.py:167 msgid "User password expiration" msgstr "用户密码过期时间" -#: settings/serializers/settings.py:164 +#: settings/serializers/settings.py:168 msgid "" "Tip: (unit: day) If the user does not update the password during the time, " "the user password will expire failure;The password expiration reminder mail " @@ -2353,35 +2275,35 @@ msgstr "" "提示:(单位:天)如果用户在此期间没有更新密码,用户密码将过期失效; 密码过期" "提醒邮件将在密码过期前5天内由系统(每天)自动发送给用户" -#: settings/serializers/settings.py:168 +#: settings/serializers/settings.py:172 msgid "Password minimum length" msgstr "密码最小长度" -#: settings/serializers/settings.py:171 +#: settings/serializers/settings.py:175 msgid "Must contain capital" msgstr "必须包含大写字符" -#: settings/serializers/settings.py:173 +#: settings/serializers/settings.py:177 msgid "Must contain lowercase" msgstr "必须包含小写字符" -#: settings/serializers/settings.py:174 +#: settings/serializers/settings.py:178 msgid "Must contain numeric" msgstr "必须包含数字" -#: settings/serializers/settings.py:175 +#: settings/serializers/settings.py:179 msgid "Must contain special" msgstr "必须包含特殊字符" -#: settings/serializers/settings.py:176 +#: settings/serializers/settings.py:180 msgid "Insecure command alert" msgstr "危险命令告警" -#: settings/serializers/settings.py:178 +#: settings/serializers/settings.py:182 msgid "Email recipient" msgstr "邮件收件人" -#: settings/serializers/settings.py:179 +#: settings/serializers/settings.py:183 msgid "Multiple user using , split" msgstr "多个用户,使用 , 分割" @@ -2532,12 +2454,7 @@ msgstr "商业支持" #: templates/_header_bar.html:70 templates/_nav.html:30 #: templates/_nav_user.html:37 users/forms/profile.py:43 -#: users/templates/users/_user.html:44 #: users/templates/users/user_password_update.html:39 -#: users/templates/users/user_profile.html:17 -#: users/templates/users/user_profile_update.html:37 -#: users/templates/users/user_profile_update.html:61 -#: users/templates/users/user_pubkey_update.html:37 msgid "Profile" msgstr "个人信息" @@ -2659,8 +2576,6 @@ msgid "Applications" msgstr "应用管理" #: templates/_nav.html:64 templates/_nav.html:82 templates/_nav_user.html:16 -#: users/templates/users/user_remote_app_permission.html:39 -#: users/templates/users/user_remote_app_permission.html:64 msgid "RemoteApp" msgstr "远程应用" @@ -3028,7 +2943,6 @@ msgid "High" msgstr "较高" #: terminal/const.py:33 users/templates/users/reset_password.html:50 -#: users/templates/users/user_create.html:35 #: users/templates/users/user_password_update.html:104 #: users/templates/users/user_update.html:57 msgid "Normal" @@ -3655,9 +3569,7 @@ msgstr "确认密码" msgid "Password does not match" msgstr "密码不一致" -#: users/forms/profile.py:101 users/models/user.py:532 -#: users/templates/users/user_detail.html:57 -#: users/templates/users/user_profile.html:59 +#: users/forms/profile.py:101 users/models/user.py:537 msgid "Email" msgstr "邮件" @@ -3690,49 +3602,47 @@ msgid "Public key should not be the same as your old one." msgstr "不能和原来的密钥相同" #: users/forms/profile.py:149 users/serializers/profile.py:71 -#: users/serializers/profile.py:144 users/serializers/profile.py:157 +#: users/serializers/profile.py:145 users/serializers/profile.py:158 msgid "Not a valid ssh public key" msgstr "SSH密钥不合法" -#: users/models/user.py:157 +#: users/models/user.py:162 msgid "System administrator" msgstr "系统管理员" -#: users/models/user.py:158 +#: users/models/user.py:163 msgid "System auditor" msgstr "系统审计员" -#: users/models/user.py:447 users/templates/users/user_profile.html:90 +#: users/models/user.py:452 msgid "Force enable" msgstr "强制启用" -#: users/models/user.py:512 +#: users/models/user.py:517 msgid "Local" msgstr "数据库" -#: users/models/user.py:543 +#: users/models/user.py:548 msgid "Avatar" msgstr "头像" -#: users/models/user.py:546 users/templates/users/user_detail.html:68 +#: users/models/user.py:551 msgid "Wechat" msgstr "微信" -#: users/models/user.py:576 users/templates/users/user_detail.html:89 -#: users/templates/users/user_list.html:18 -#: users/templates/users/user_profile.html:102 +#: users/models/user.py:581 msgid "Source" msgstr "用户来源" -#: users/models/user.py:580 +#: users/models/user.py:585 msgid "Date password last updated" msgstr "最后更新密码日期" -#: users/models/user.py:715 +#: users/models/user.py:720 msgid "Administrator" msgstr "管理员" -#: users/models/user.py:718 +#: users/models/user.py:723 msgid "Administrator is the super user of system" msgstr "Administrator是初始的超级管理员" @@ -3740,7 +3650,7 @@ msgstr "Administrator是初始的超级管理员" msgid "The old password is incorrect" msgstr "旧密码错误" -#: users/serializers/profile.py:37 users/serializers/user.py:112 +#: users/serializers/profile.py:37 users/serializers/user.py:113 msgid "Password does not match security rules" msgstr "密码不满足安全规则" @@ -3748,7 +3658,7 @@ msgstr "密码不满足安全规则" msgid "The newly set password is inconsistent" msgstr "两次密码不一致" -#: users/serializers/profile.py:115 users/serializers/user.py:67 +#: users/serializers/profile.py:116 users/serializers/user.py:68 msgid "Is first login" msgstr "首次登录" @@ -3789,35 +3699,35 @@ msgstr "是否可更新" msgid "Can delete" msgstr "是否可删除" -#: users/serializers/user.py:38 users/serializers/user.py:74 +#: users/serializers/user.py:39 users/serializers/user.py:75 msgid "Organization role name" msgstr "组织角色名称" -#: users/serializers/user.py:70 +#: users/serializers/user.py:71 msgid "Avatar url" msgstr "头像路径" -#: users/serializers/user.py:72 +#: users/serializers/user.py:73 msgid "Groups name" msgstr "用户组名" -#: users/serializers/user.py:73 +#: users/serializers/user.py:74 msgid "Source name" msgstr "用户来源名" -#: users/serializers/user.py:75 +#: users/serializers/user.py:76 msgid "Super role name" msgstr "超级角色名称" -#: users/serializers/user.py:76 +#: users/serializers/user.py:77 msgid "Total role name" msgstr "汇总角色名称" -#: users/serializers/user.py:100 +#: users/serializers/user.py:101 msgid "Role limit to {}" msgstr "角色只能为 {}" -#: users/serializers/user.py:197 +#: users/serializers/user.py:198 msgid "name not unique" msgstr "名称重复" @@ -3825,9 +3735,8 @@ msgstr "名称重复" msgid "Security token validation" msgstr "安全令牌验证" -#: users/templates/users/_base_otp.html:14 users/templates/users/_user.html:13 -#: users/templates/users/user_profile_update.html:55 -#: xpack/plugins/cloud/models.py:78 xpack/plugins/cloud/serializers.py:145 +#: users/templates/users/_base_otp.html:14 xpack/plugins/cloud/models.py:78 +#: xpack/plugins/cloud/serializers.py:145 msgid "Account" msgstr "账户" @@ -3847,36 +3756,6 @@ msgstr "选择用户" msgid "Asset num" msgstr "资产数量" -#: users/templates/users/_user.html:21 -msgid "Auth" -msgstr "认证" - -#: users/templates/users/_user.html:27 -msgid "Security and Role" -msgstr "角色安全" - -#: users/templates/users/_user.html:51 -#: users/templates/users/user_bulk_update.html:23 -#: users/templates/users/user_detail.html:168 -#: users/templates/users/user_group_create_update.html:27 -#: users/templates/users/user_password_update.html:74 -#: users/templates/users/user_profile.html:209 -#: users/templates/users/user_profile_update.html:67 -#: users/templates/users/user_pubkey_update.html:74 -#: users/templates/users/user_pubkey_update.html:80 -msgid "Reset" -msgstr "重置" - -#: users/templates/users/_user.html:52 -#: users/templates/users/forgot_password.html:32 -#: users/templates/users/user_bulk_update.html:24 -#: users/templates/users/user_list.html:40 -#: users/templates/users/user_password_update.html:75 -#: users/templates/users/user_profile_update.html:68 -#: users/templates/users/user_pubkey_update.html:81 -msgid "Submit" -msgstr "提交" - #: users/templates/users/_user_detail_nav_header.html:11 msgid "User detail" msgstr "用户详情" @@ -3886,8 +3765,6 @@ msgid "User permissions" msgstr "用户授权" #: users/templates/users/_user_detail_nav_header.html:23 -#: users/templates/users/user_group_detail.html:20 -#: users/templates/users/user_group_granted_asset.html:21 msgid "Asset granted" msgstr "授权的资产" @@ -3932,56 +3809,53 @@ msgstr "获取更多信息" msgid "Input your email, that will send a mail to your" msgstr "输入您的邮箱, 将会发一封重置邮件到您的邮箱中" +#: users/templates/users/forgot_password.html:32 +#: users/templates/users/user_password_update.html:75 +msgid "Submit" +msgstr "提交" + #: users/templates/users/reset_password.html:5 -#: users/templates/users/reset_password.html:6 -#: users/templates/users/user_detail.html:402 users/utils.py:83 +#: users/templates/users/reset_password.html:6 users/utils.py:83 msgid "Reset password" msgstr "重置密码" #: users/templates/users/reset_password.html:23 -#: users/templates/users/user_create.html:13 #: users/templates/users/user_password_update.html:64 #: users/templates/users/user_update.html:13 msgid "Your password must satisfy" msgstr "您的密码必须满足:" #: users/templates/users/reset_password.html:24 -#: users/templates/users/user_create.html:14 #: users/templates/users/user_password_update.html:65 #: users/templates/users/user_update.html:14 msgid "Password strength" msgstr "密码强度:" #: users/templates/users/reset_password.html:48 -#: users/templates/users/user_create.html:33 #: users/templates/users/user_password_update.html:102 #: users/templates/users/user_update.html:55 msgid "Very weak" msgstr "很弱" #: users/templates/users/reset_password.html:49 -#: users/templates/users/user_create.html:34 #: users/templates/users/user_password_update.html:103 #: users/templates/users/user_update.html:56 msgid "Weak" msgstr "弱" #: users/templates/users/reset_password.html:51 -#: users/templates/users/user_create.html:36 #: users/templates/users/user_password_update.html:105 #: users/templates/users/user_update.html:58 msgid "Medium" msgstr "一般" #: users/templates/users/reset_password.html:52 -#: users/templates/users/user_create.html:37 #: users/templates/users/user_password_update.html:106 #: users/templates/users/user_update.html:59 msgid "Strong" msgstr "强" #: users/templates/users/reset_password.html:53 -#: users/templates/users/user_create.html:38 #: users/templates/users/user_password_update.html:107 #: users/templates/users/user_update.html:60 msgid "Very strong" @@ -3990,8 +3864,6 @@ msgstr "很强" #: users/templates/users/user_asset_permission.html:43 #: users/templates/users/user_asset_permission.html:155 #: users/templates/users/user_database_app_permission.html:41 -#: users/templates/users/user_list.html:19 -#: users/templates/users/user_remote_app_permission.html:41 #: xpack/plugins/cloud/models.py:34 msgid "Validity" msgstr "有效" @@ -4008,229 +3880,6 @@ msgstr "包含" msgid "Exclude" msgstr "不包含" -#: users/templates/users/user_bulk_update.html:8 -msgid "Select properties that need to be modified" -msgstr "选择需要修改属性" - -#: users/templates/users/user_bulk_update.html:10 -msgid "Select all" -msgstr "全选" - -#: users/templates/users/user_create.html:4 -#: users/templates/users/user_list.html:7 -msgid "Create user" -msgstr "创建用户" - -#: users/templates/users/user_detail.html:80 -msgid "Force enabled" -msgstr "强制启用" - -#: users/templates/users/user_detail.html:101 -#: users/templates/users/user_profile.html:106 -msgid "Date joined" -msgstr "创建日期" - -#: users/templates/users/user_detail.html:105 -#: users/templates/users/user_profile.html:110 -msgid "Last login" -msgstr "最后登录" - -#: users/templates/users/user_detail.html:110 -#: users/templates/users/user_profile.html:115 -msgid "Last password updated" -msgstr "最后更新密码" - -#: users/templates/users/user_detail.html:126 -#: users/templates/users/user_profile.html:150 -msgid "Quick modify" -msgstr "快速修改" - -#: users/templates/users/user_detail.html:148 -msgid "Force enabled MFA" -msgstr "强制启用多因子认证" - -#: users/templates/users/user_detail.html:165 -msgid "Reset MFA" -msgstr "重置多因子认证" - -#: users/templates/users/user_detail.html:174 -msgid "Send reset password mail" -msgstr "发送重置密码邮件" - -#: users/templates/users/user_detail.html:177 -#: users/templates/users/user_detail.html:187 -msgid "Send" -msgstr "发送" - -#: users/templates/users/user_detail.html:184 -msgid "Send reset ssh key mail" -msgstr "发送重置密钥邮件" - -#: users/templates/users/user_detail.html:193 -#: users/templates/users/user_detail.html:490 -msgid "Unblock user" -msgstr "解除登录限制" - -#: users/templates/users/user_detail.html:196 -msgid "Unblock" -msgstr "解除" - -#: users/templates/users/user_detail.html:217 -msgid "Join user groups" -msgstr "添加到用户组" - -#: users/templates/users/user_detail.html:226 -msgid "Join" -msgstr "加入" - -#: users/templates/users/user_detail.html:356 -#: users/templates/users/user_detail.html:383 -msgid "Update successfully!" -msgstr "更新成功" - -#: users/templates/users/user_detail.html:365 -msgid "Goto profile page enable MFA" -msgstr "请去个人信息页面启用自己的多因子认证" - -#: users/templates/users/user_detail.html:401 -msgid "An e-mail has been sent to the user`s mailbox." -msgstr "已发送邮件到用户邮箱" - -#: users/templates/users/user_detail.html:411 -#: users/templates/users/user_detail.html:437 -#: users/templates/users/user_detail.html:505 -#: users/templates/users/user_list.html:178 -msgid "Are you sure?" -msgstr "你确认吗?" - -#: users/templates/users/user_detail.html:412 -msgid "This will reset the user password and send a reset mail" -msgstr "将失效用户当前密码,并发送重设密码邮件到用户邮箱" - -#: users/templates/users/user_detail.html:415 -#: users/templates/users/user_detail.html:441 -#: users/templates/users/user_detail.html:509 -#: users/templates/users/user_list.html:182 -msgid "Cancel" -msgstr "取消" - -#: users/templates/users/user_detail.html:427 -msgid "" -"The reset-ssh-public-key E-mail has been sent successfully. Please inform " -"the user to update his new ssh public key." -msgstr "重设密钥邮件将会发送到用户邮箱" - -#: users/templates/users/user_detail.html:428 -msgid "Reset SSH public key" -msgstr "重置SSH密钥" - -#: users/templates/users/user_detail.html:438 -msgid "This will reset the user public key and send a reset mail" -msgstr "将会失效用户当前密钥,并发送重置邮件到用户邮箱" - -#: users/templates/users/user_detail.html:456 -msgid "Successfully updated the SSH public key." -msgstr "更新SSH密钥成功" - -#: users/templates/users/user_detail.html:457 -#: users/templates/users/user_detail.html:461 -msgid "User SSH public key update" -msgstr "SSH密钥" - -#: users/templates/users/user_detail.html:506 -msgid "After unlocking the user, the user can log in normally." -msgstr "解除用户登录限制后,此用户即可正常登录" - -#: users/templates/users/user_detail.html:520 -msgid "Reset user MFA success" -msgstr "重置用户多因子认证成功" - -#: users/templates/users/user_granted_remote_app.html:35 -msgid "App type" -msgstr "应用类型" - -#: users/templates/users/user_group_detail.html:17 -#: users/templates/users/user_group_granted_asset.html:18 -msgid "User group detail" -msgstr "用户组详情" - -#: users/templates/users/user_group_detail.html:81 -msgid "Add user" -msgstr "添加用户" - -#: users/templates/users/user_group_detail.html:87 -msgid "Add" -msgstr "添加" - -#: users/templates/users/user_group_list.html:7 -msgid "Create user group" -msgstr "创建用户组" - -#: users/templates/users/user_list.html:30 -msgid "Delete selected" -msgstr "批量删除" - -#: users/templates/users/user_list.html:32 -msgid "Remove selected" -msgstr "批量移除" - -#: users/templates/users/user_list.html:34 -msgid "Update selected" -msgstr "批量更新" - -#: users/templates/users/user_list.html:35 -msgid "Deactive selected" -msgstr "禁用所选" - -#: users/templates/users/user_list.html:36 -msgid "Active selected" -msgstr "激活所选" - -#: users/templates/users/user_list.html:106 -#: users/templates/users/user_list.html:110 -msgid "Remove" -msgstr "移除" - -#: users/templates/users/user_list.html:179 -msgid "This will delete the selected users !!!" -msgstr "删除选中用户 !!!" - -#: users/templates/users/user_list.html:190 -msgid "User Deleting failed." -msgstr "用户删除失败" - -#: users/templates/users/user_list.html:191 -msgid "User Delete" -msgstr "删除" - -#: users/templates/users/user_list.html:213 -msgid "This will remove the selected users !!" -msgstr "移除选中用户 !!!" - -#: users/templates/users/user_list.html:215 -msgid "User Removing failed." -msgstr "用户移除失败" - -#: users/templates/users/user_list.html:216 -msgid "User Remove" -msgstr "移除" - -#: users/templates/users/user_list.html:265 -msgid "Are you sure about removing it?" -msgstr "您确定移除吗?" - -#: users/templates/users/user_list.html:266 -msgid "Remove the success" -msgstr "移除成功" - -#: users/templates/users/user_list.html:271 -msgid "User is expired" -msgstr "用户已失效" - -#: users/templates/users/user_list.html:274 -msgid "User is inactive" -msgstr "用户已禁用" - #: users/templates/users/user_otp_check_password.html:6 #: users/templates/users/user_verify_mfa.html:6 msgid "Authenticate" @@ -4275,57 +3924,15 @@ msgid "" "installed, go to the next step directly)." msgstr "安装完成后点击下一步进入绑定页面(如已安装,直接进入下一步)" +#: users/templates/users/user_password_update.html:74 +msgid "Reset" +msgstr "重置" + #: users/templates/users/user_password_verify.html:8 #: users/templates/users/user_password_verify.html:9 msgid "Verify password" msgstr "校验密码" -#: users/templates/users/user_profile.html:97 -msgid "Administrator Settings force MFA login" -msgstr "管理员设置强制使用多因子认证" - -#: users/templates/users/user_profile.html:156 -msgid "Set MFA" -msgstr "设置多因子认证" - -#: users/templates/users/user_profile.html:178 -msgid "Update MFA" -msgstr "更改多因子认证" - -#: users/templates/users/user_profile.html:188 -msgid "Update password" -msgstr "更改密码" - -#: users/templates/users/user_profile.html:198 -msgid "Update SSH public key" -msgstr "更改SSH密钥" - -#: users/templates/users/user_profile.html:206 -msgid "Reset public key and download" -msgstr "重置并下载SSH密钥" - -#: users/templates/users/user_pubkey_update.html:55 -msgid "Old public key" -msgstr "原来SSH密钥" - -#: users/templates/users/user_pubkey_update.html:63 -msgid "Fingerprint" -msgstr "指纹" - -#: users/templates/users/user_pubkey_update.html:69 -msgid "Update public key" -msgstr "更新密钥" - -#: users/templates/users/user_pubkey_update.html:72 -msgid "Or reset by server" -msgstr "或者重置并下载密钥" - -#: users/templates/users/user_pubkey_update.html:98 -msgid "" -"The new public key has been set successfully, Please download the " -"corresponding private key." -msgstr "新的公钥已设置成功,请下载对应的私钥" - #: users/templates/users/user_update.html:4 msgid "Update user" msgstr "更新用户" @@ -5182,6 +4789,202 @@ msgstr "旗舰版" msgid "Community edition" msgstr "社区版" +#~ msgid "Auth" +#~ msgstr "认证" + +#~ msgid "Security and Role" +#~ msgstr "角色安全" + +#~ msgid "Select properties that need to be modified" +#~ msgstr "选择需要修改属性" + +#~ msgid "Select all" +#~ msgstr "全选" + +#~ msgid "Create user" +#~ msgstr "创建用户" + +#~ msgid "Force enabled" +#~ msgstr "强制启用" + +#~ msgid "Date joined" +#~ msgstr "创建日期" + +#~ msgid "Last login" +#~ msgstr "最后登录" + +#~ msgid "Last password updated" +#~ msgstr "最后更新密码" + +#~ msgid "Quick modify" +#~ msgstr "快速修改" + +#~ msgid "Force enabled MFA" +#~ msgstr "强制启用多因子认证" + +#~ msgid "Reset MFA" +#~ msgstr "重置多因子认证" + +#~ msgid "Send reset password mail" +#~ msgstr "发送重置密码邮件" + +#~ msgid "Send" +#~ msgstr "发送" + +#~ msgid "Send reset ssh key mail" +#~ msgstr "发送重置密钥邮件" + +#~ msgid "Unblock user" +#~ msgstr "解除登录限制" + +#~ msgid "Unblock" +#~ msgstr "解除" + +#~ msgid "Join user groups" +#~ msgstr "添加到用户组" + +#~ msgid "Join" +#~ msgstr "加入" + +#~ msgid "Update successfully!" +#~ msgstr "更新成功" + +#~ msgid "Goto profile page enable MFA" +#~ msgstr "请去个人信息页面启用自己的多因子认证" + +#~ msgid "An e-mail has been sent to the user`s mailbox." +#~ msgstr "已发送邮件到用户邮箱" + +#~ msgid "Are you sure?" +#~ msgstr "你确认吗?" + +#~ msgid "This will reset the user password and send a reset mail" +#~ msgstr "将失效用户当前密码,并发送重设密码邮件到用户邮箱" + +#~ msgid "Cancel" +#~ msgstr "取消" + +#~ msgid "" +#~ "The reset-ssh-public-key E-mail has been sent successfully. Please inform " +#~ "the user to update his new ssh public key." +#~ msgstr "重设密钥邮件将会发送到用户邮箱" + +#~ msgid "Reset SSH public key" +#~ msgstr "重置SSH密钥" + +#~ msgid "This will reset the user public key and send a reset mail" +#~ msgstr "将会失效用户当前密钥,并发送重置邮件到用户邮箱" + +#~ msgid "Successfully updated the SSH public key." +#~ msgstr "更新SSH密钥成功" + +#~ msgid "User SSH public key update" +#~ msgstr "SSH密钥" + +#~ msgid "After unlocking the user, the user can log in normally." +#~ msgstr "解除用户登录限制后,此用户即可正常登录" + +#~ msgid "Reset user MFA success" +#~ msgstr "重置用户多因子认证成功" + +#~ msgid "App type" +#~ msgstr "应用类型" + +#~ msgid "User group detail" +#~ msgstr "用户组详情" + +#~ msgid "Add user" +#~ msgstr "添加用户" + +#~ msgid "Add" +#~ msgstr "添加" + +#~ msgid "Create user group" +#~ msgstr "创建用户组" + +#~ msgid "Delete selected" +#~ msgstr "批量删除" + +#~ msgid "Remove selected" +#~ msgstr "批量移除" + +#~ msgid "Update selected" +#~ msgstr "批量更新" + +#~ msgid "Deactive selected" +#~ msgstr "禁用所选" + +#~ msgid "Active selected" +#~ msgstr "激活所选" + +#~ msgid "Remove" +#~ msgstr "移除" + +#~ msgid "This will delete the selected users !!!" +#~ msgstr "删除选中用户 !!!" + +#~ msgid "User Deleting failed." +#~ msgstr "用户删除失败" + +#~ msgid "User Delete" +#~ msgstr "删除" + +#~ msgid "This will remove the selected users !!" +#~ msgstr "移除选中用户 !!!" + +#~ msgid "User Removing failed." +#~ msgstr "用户移除失败" + +#~ msgid "User Remove" +#~ msgstr "移除" + +#~ msgid "Are you sure about removing it?" +#~ msgstr "您确定移除吗?" + +#~ msgid "Remove the success" +#~ msgstr "移除成功" + +#~ msgid "User is expired" +#~ msgstr "用户已失效" + +#~ msgid "User is inactive" +#~ msgstr "用户已禁用" + +#~ msgid "Administrator Settings force MFA login" +#~ msgstr "管理员设置强制使用多因子认证" + +#~ msgid "Set MFA" +#~ msgstr "设置多因子认证" + +#~ msgid "Update MFA" +#~ msgstr "更改多因子认证" + +#~ msgid "Update password" +#~ msgstr "更改密码" + +#~ msgid "Update SSH public key" +#~ msgstr "更改SSH密钥" + +#~ msgid "Reset public key and download" +#~ msgstr "重置并下载SSH密钥" + +#~ msgid "Old public key" +#~ msgstr "原来SSH密钥" + +#~ msgid "Fingerprint" +#~ msgstr "指纹" + +#~ msgid "Update public key" +#~ msgstr "更新密钥" + +#~ msgid "Or reset by server" +#~ msgstr "或者重置并下载密钥" + +#~ msgid "" +#~ "The new public key has been set successfully, Please download the " +#~ "corresponding private key." +#~ msgstr "新的公钥已设置成功,请下载对应的私钥" + #~ msgid "(Domain name support)" #~ msgstr "(支持域名)" diff --git a/apps/settings/serializers/settings.py b/apps/settings/serializers/settings.py index c6a3c32ac..95757eb8b 100644 --- a/apps/settings/serializers/settings.py +++ b/apps/settings/serializers/settings.py @@ -121,7 +121,11 @@ class TerminalSettingSerializer(serializers.Serializer): ('50', '50'), ) TERMINAL_PASSWORD_AUTH = serializers.BooleanField(required=False, label=_('Password auth')) - TERMINAL_PUBLIC_KEY_AUTH = serializers.BooleanField(required=False, label=_('Public key auth')) + TERMINAL_PUBLIC_KEY_AUTH = serializers.BooleanField( + required=False, label=_('Public key auth'), + help_text=_('Tips: If use other auth method, like AD/LDAP, you should disable this to ' + 'avoid being able to log in after deleting') + ) TERMINAL_ASSET_LIST_SORT_BY = serializers.ChoiceField(SORT_BY_CHOICES, required=False, label=_('List sort by')) TERMINAL_ASSET_LIST_PAGE_SIZE = serializers.ChoiceField(PAGE_SIZE_CHOICES, required=False, label=_('List page size')) TERMINAL_SESSION_KEEP_DURATION = serializers.IntegerField( diff --git a/apps/users/models/user.py b/apps/users/models/user.py index b10c07223..1f8b2418a 100644 --- a/apps/users/models/user.py +++ b/apps/users/models/user.py @@ -66,13 +66,9 @@ class AuthMixin: def can_update_ssh_key(self): return self.can_use_ssh_key_login() - def can_use_ssh_key_login(self): - if not settings.TERMINAL_PUBLIC_KEY_AUTH: - return False - if self.is_local or settings.TERMINAL_ONLY_SOURCE_LOCAL_CAN_PUBLIC_KEY_AUTH: - return True - else: - return False + @staticmethod + def can_use_ssh_key_login(): + return settings.TERMINAL_PUBLIC_KEY_AUTH def is_public_key_valid(self): """ diff --git a/apps/users/templates/users/_user.html b/apps/users/templates/users/_user.html deleted file mode 100644 index dbcf7f804..000000000 --- a/apps/users/templates/users/_user.html +++ /dev/null @@ -1,88 +0,0 @@ -{% extends '_base_create_update.html' %} -{% load i18n %} -{% load static %} -{% load bootstrap3 %} -{% block form %} - {% if form.non_field_errors %} -
- {{ form.non_field_errors }} -
- {% endif %} -
- {% csrf_token %} -

{% trans 'Account' %}

- {% bootstrap_field form.name layout="horizontal" %} - {% bootstrap_field form.username layout="horizontal" %} - {% bootstrap_field form.email layout="horizontal" %} - {% bootstrap_field form.groups layout="horizontal" %} - -
- -

{% trans 'Auth' %}

- {% block password %}{% endblock %} - {% bootstrap_field form.mfa_level layout="horizontal" %} - {% bootstrap_field form.source layout="horizontal" %} - -
-

{% trans 'Security and Role' %}

- {% bootstrap_field form.role layout="horizontal" %} -
- -
-
- - {% if form.errors %} - - {% else %} - - {% endif %} -
- {{ form.date_expired.errors }} -
-
-
-

{% trans 'Profile' %}

- {% bootstrap_field form.phone layout="horizontal" %} - {% bootstrap_field form.wechat layout="horizontal" %} - {% bootstrap_field form.comment layout="horizontal" %} -
-
-
- - -
-
-
- -{% endblock %} -{% block custom_foot_js %} - - - - - - - -{% endblock %} diff --git a/apps/users/templates/users/user_bulk_update.html b/apps/users/templates/users/user_bulk_update.html deleted file mode 100644 index 28b0e8cb7..000000000 --- a/apps/users/templates/users/user_bulk_update.html +++ /dev/null @@ -1,70 +0,0 @@ -{% extends '_base_create_update.html' %} -{% load static %} -{% load bootstrap3 %} -{% load i18n %} - -{% block form %} -
-

{% trans 'Select properties that need to be modified' %}

-
- {% trans 'Select all' %} - {% for field in form %} - {% if field.name != 'users' %} - {{ field.label }} - {% endif %} - {% endfor %} -
-
-
- {% csrf_token %} - {% bootstrap_form form layout="horizontal" %} -
-
- - -
-
-
-{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_create.html b/apps/users/templates/users/user_create.html deleted file mode 100644 index 5e15b5469..000000000 --- a/apps/users/templates/users/user_create.html +++ /dev/null @@ -1,100 +0,0 @@ -{% extends 'users/_user.html' %} -{% load i18n %} -{% load bootstrap3 %} -{% block user_template_title %}{% trans "Create user" %}{% endblock %} -{% block password %} - {% bootstrap_field form.password_strategy layout="horizontal" %} - {% bootstrap_field form.password layout="horizontal" %} - {# 密码popover #} -
- -
- -{% endblock %} - diff --git a/apps/users/templates/users/user_detail.html b/apps/users/templates/users/user_detail.html deleted file mode 100644 index 0b624b78a..000000000 --- a/apps/users/templates/users/user_detail.html +++ /dev/null @@ -1,550 +0,0 @@ -{% extends 'users/_base_user_detail.html' %} -{% load static %} -{% load i18n %} - -{% block custom_head_css_js %} - - -{% endblock %} - -{% block content_nav_delete_update %} -
  • - {% trans 'Update' %} -
  • -
  • - - {% trans 'Delete' %} - -
  • -{% endblock %} - -{% block content_table %} -
    -
    -
    - {{ object.name }} -
    - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - - {% if user.phone %} - - - - - {% endif %} - {% if object.wechat %} - - - - - {% endif %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if object.can_update_password %} - - - - - {% endif %} - - - - - -
    - -
    {% trans 'Name' %}:{{ object.name }}
    {% trans 'Username' %}:{{ object.username }}
    {% trans 'Email' %}:{{ object.email }}
    {% trans 'Phone' %}:{{ object.phone }}
    {% trans 'Wechat' %}:{{ object.wechat }}
    {% trans 'Role' %}:{{ object.org_role_display }}
    {% trans 'MFA' %}: - {% if object.mfa_force_enabled %} - {% trans 'Force enabled' %} - {% elif object.mfa_enabled%} - {% trans 'Enabled' %} - {% else %} - {% trans 'Disabled' %} - {% endif %} -
    {% trans 'Source' %}:{{ object.get_source_display }}
    {% trans 'Date expired' %}:{{ object.date_expired|date:"Y-m-j H:i:s" }}
    {% trans 'Created by' %}:{{ object.created_by }}
    {% trans 'Date joined' %}:{{ object.date_joined|date:"Y-m-j H:i:s" }}
    {% trans 'Last login' %}:{{ object.last_login|date:"Y-m-j H:i:s" }}
    {% trans 'Last password updated' %}:{{ object.date_password_last_updated|date:"Y-m-j H:i:s" }}
    {% trans 'Comment' %}:{{ object.comment }}
    -
    -
    -
    -
    -
    -
    - {% trans 'Quick modify' %} -
    -
    - - - - - - - - - - - - - - - {% if object.can_update_password %} - - - - - {% endif %} - {% if object.can_update_ssh_key %} - - - - - {% endif %} - - - - - -
    {% trans 'Active' %}: - -
    -
    - - -
    -
    -
    -
    {% trans 'Force enabled MFA' %}: - -
    -
    - - -
    -
    -
    -
    {% trans 'Reset MFA' %}: - - - -
    {% trans 'Send reset password mail' %}: - - - -
    {% trans 'Send reset ssh key mail' %}: - - - -
    {% trans 'Unblock user' %} - - - -
    -
    -
    - {% if request.user.can_admin_current_org %} - - {% if object.can_user_current_org or object.can_admin_current_org %} -
    -
    - {% trans 'User group' %} -
    -
    - - - - - - - - - - - - {% for group in object.groups.all %} - - - - - {% endfor %} - -
    - -
    - -
    - {{ group.name }} - - -
    -
    -
    - {% endif %} - - {% if LICENSE_VALID and LOGIN_CONFIRM_ENABLE %} -
    -
    - {% trans 'Login confirm' %} -
    -
    - - - - - - - - - - - {% if object.get_login_confirm_setting %} - {% for u in object.login_confirm_setting.reviewers.all %} - - - - - {% endfor %} - {% endif %} - -
    - -
    - -
    - {{ u }} - - -
    -
    -
    - {% endif %} - - {% endif %} -
    - -{% include 'users/_user_update_pk_modal.html' %} - -{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_granted_asset.html b/apps/users/templates/users/user_granted_asset.html deleted file mode 100644 index 523697153..000000000 --- a/apps/users/templates/users/user_granted_asset.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'users/_base_user_detail.html' %} -{% load bootstrap3 %} -{% load static %} -{% load i18n %} - -{% block custom_head_css_js %} - - -{% endblock %} - -{% block content_table %} -{% include 'users/_granted_assets.html' %} -{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_granted_database_app.html b/apps/users/templates/users/user_granted_database_app.html deleted file mode 100644 index 7133a9217..000000000 --- a/apps/users/templates/users/user_granted_database_app.html +++ /dev/null @@ -1,100 +0,0 @@ -{% extends 'users/_base_user_detail.html' %} -{% load i18n static %} - -{% block custom_head_css_js %} - -{% endblock %} - -{% block content_table %} -
    -
    -
    - {{ object.name }} -
    - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - -
    - - {% trans 'Name' %}{% trans 'Type' %}{% trans 'Host' %}{% trans 'Database' %}{% trans 'Comment' %}
    -
    -
    -
    -{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_granted_remote_app.html b/apps/users/templates/users/user_granted_remote_app.html deleted file mode 100644 index 19b8ab22c..000000000 --- a/apps/users/templates/users/user_granted_remote_app.html +++ /dev/null @@ -1,93 +0,0 @@ -{% extends 'users/_base_user_detail.html' %} -{% load i18n static %} - -{% block custom_head_css_js %} - -{% endblock %} - -{% block content_table %} -
    -
    -
    - {{ object.name }} -
    - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - -
    - - {% trans 'Name' %}{% trans 'App type' %}{% trans 'Asset' %}{% trans 'Comment' %}
    -
    -
    -
    -{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_group_create_update.html b/apps/users/templates/users/user_group_create_update.html deleted file mode 100644 index 09030eca8..000000000 --- a/apps/users/templates/users/user_group_create_update.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends 'base.html' %} -{% load static %} -{% load i18n %} -{% load bootstrap3 %} - -{% block content %} -
    -
    -
    -
    -
    -
    {{ action }}
    -
    -
    - {% if form.non_field_errors %} -
    - {{ form.non_field_errors }} -
    - {% endif %} -
    - {% csrf_token %} - {% bootstrap_field form.name layout="horizontal" %} - {% bootstrap_field form.users layout="horizontal" %} - {% bootstrap_field form.comment layout="horizontal" %} -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    - {% include "users/_select_user_modal.html" %} -{% endblock %} -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_group_detail.html b/apps/users/templates/users/user_group_detail.html deleted file mode 100644 index cd65bb746..000000000 --- a/apps/users/templates/users/user_group_detail.html +++ /dev/null @@ -1,168 +0,0 @@ -{% extends 'base.html' %} -{% load static %} -{% load i18n %} - -{% block custom_head_css_js %} - - -{% endblock %} -{% block content %} -
    -
    -
    -
    - -
    -
    -
    -
    - {{ user_group.name }} - -
    -
    - - - - - - - - - - - - - - - - - - - -
    {% trans 'Name' %}:{{ user_group.name }}
    {% trans 'Create by' %}:{{ user_group.created_by }}
    {% trans 'Date created' %}:{{ user_group.date_created }}
    {% trans 'Comment' %}:{{ user_group.comment }}
    -
    -
    -
    -
    -
    -
    - {% trans 'User' %} -
    -
    - - - - - - - - - - - - {% for user in user_group.users.all %} - - - - - {% endfor %} - -
    - -
    - -
    {{ user.name }} - -
    -
    -
    -
    -
    -
    -
    -
    -
    -{% endblock %} -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_group_granted_asset.html b/apps/users/templates/users/user_group_granted_asset.html deleted file mode 100644 index 2180e6313..000000000 --- a/apps/users/templates/users/user_group_granted_asset.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends 'base.html' %} -{% load bootstrap3 %} -{% load static %} -{% load i18n %} - -{% block custom_head_css_js %} - - -{% endblock %} -{% block content %} -
    -
    -
    -
    - -
    - {% include 'users/_granted_assets.html' %} -
    -
    -
    -
    -
    -{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_group_list.html b/apps/users/templates/users/user_group_list.html deleted file mode 100644 index 5e354d3db..000000000 --- a/apps/users/templates/users/user_group_list.html +++ /dev/null @@ -1,112 +0,0 @@ -{% extends '_base_list.html' %} -{% load i18n static %} -{% block table_search %} - {% include '_csv_import_export.html' %} -{% endblock %} -{% block table_container %} - - - - - - - - - - - -
    - - {% trans 'Name' %}{% trans 'User' %}{% trans 'Comment' %}{% trans 'Action' %}
    -{% endblock %} - -{% block content_bottom_left %}{% endblock %} -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_list.html b/apps/users/templates/users/user_list.html deleted file mode 100644 index 28b30f73d..000000000 --- a/apps/users/templates/users/user_list.html +++ /dev/null @@ -1,280 +0,0 @@ -{% extends '_base_list.html' %} -{% load i18n static %} -{% block table_search %} - {% include '_csv_import_export.html' %} -{% endblock %} -{% block table_container %} - - - - - - - - - - - - - - - - -
    - - {% trans 'Name' %}{% trans 'Username' %}{% trans 'Role' %}{% trans 'User group' %}{% trans 'Source' %}{% trans 'Validity' %}{% trans 'Action' %}
    -
    -
    - -
    - -
    -
    -
    -{% endblock %} -{% block content_bottom_left %}{% endblock %} -{% block custom_foot_js %} - - -{% endblock %} - diff --git a/apps/users/templates/users/user_profile.html b/apps/users/templates/users/user_profile.html deleted file mode 100644 index d1f77c7d0..000000000 --- a/apps/users/templates/users/user_profile.html +++ /dev/null @@ -1,233 +0,0 @@ -{% extends 'base.html' %} -{% load static %} -{% load i18n %} - -{% block custom_head_css_js %} - - -{% endblock %} -{% block content %} -
    -
    -
    -
    - -
    -
    -
    -
    - {{ user.name }} - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - {% if user.can_update_ssh_key %} - - - - - {% endif %} - - - - - - - - - - - - - - - - - {% if user.can_update_password %} - - - - - {% endif %} - - - - - - - - - - - - -
    - -
    {% trans 'Username' %}{{ user.username }}
    {% trans 'Name' %}{{ user.name }}
    {% trans 'Role' %}{{ user.get_role_display }}
    {% trans 'Email' %}{{ user.email }}
    {% trans 'Active' %}{{ user.is_active|yesno:"Yes,No,Unkown" }}
    {% trans 'Public key' %} - - - - - - - -
    - {{ user.public_key_obj.comment }} -
    - {{ user.public_key_obj.hash_md5 }} -
    -
    {% trans 'MFA' %} - {% if user.mfa_force_enabled %} - {% trans 'Force enable' %} - {% elif user.mfa_enabled%} - {% trans 'Enable' %} - {% else %} - {% trans 'Disable' %} - {% endif %} - {% if mfa_setting %} - ( {% trans 'Administrator Settings force MFA login' %} ) - {% endif %} -
    {% trans 'Source' %}{{ user.get_source_display }}
    {% trans 'Date joined' %}{{ user.date_joined|date:"Y-m-d H:i:s" }}
    {% trans 'Last login' %}{{ user.last_login|date:"Y-m-d H:i:s" }}
    {% trans 'Last password updated' %}{{ user.date_password_last_updated|date:"Y-m-d H:i:s" }}
    {% trans 'Date expired' %}{{ user.date_expired|date:"Y-m-d H:i:s" }}
    {% trans 'User groups' %} - - {% for group in user.groups.all %} - - - - {% endfor %} -
    - {{ group.name }} -
    -
    {% trans 'Comment' %}:{{ user.comment }}
    -
    -
    -
    -
    -
    -
    -
    -
    - {% trans 'Quick modify' %} -
    -
    - - - - - - - {% if request.user.mfa_enabled %} - - - - - {% endif %} - {% if request.user.can_update_password %} - - - - - {% endif %} - {% if request.user.can_update_ssh_key %} - - - - - - - - - {% endif %} - -
    {% trans 'Set MFA' %}: - - {% trans 'Disable' %} - {% else %} - {% url 'authentication:user-otp-disable-authentication' %} - ">{% trans 'Disable' %} - {% endif %} - {% else %} - {% url 'authentication:user-otp-enable-start' %} - ">{% trans 'Enable' %} - {% endif %} - - -
    {% trans 'Update MFA' %}: - - {% trans 'Update' %} - -
    {% trans 'Update password' %}: - - {% trans 'Update' %} - -
    {% trans 'Update SSH public key' %}: - - {% trans 'Update' %} - -
    {% trans 'Reset public key and download' %}: - - {% trans 'Reset' %} - -
    -
    -
    -
    -
    -
    -
    -
    -{% endblock %} -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_profile_update.html b/apps/users/templates/users/user_profile_update.html deleted file mode 100644 index e59edeccc..000000000 --- a/apps/users/templates/users/user_profile_update.html +++ /dev/null @@ -1,84 +0,0 @@ -{% extends 'base.html' %} -{% load static %} -{% load i18n %} -{% load bootstrap3 %} - -{% block custom_head_css_js %} - - - - - -{% endblock %} -{% block content %} -
    -
    -
    -
    -
    - -
    -
    -
    -
    - {% csrf_token %} -

    {% trans 'Account' %}

    - {% bootstrap_field form.username layout="horizontal" %} - {% bootstrap_field form.name layout="horizontal" %} - {% bootstrap_field form.email layout="horizontal" %} - -
    -

    {% trans 'Profile' %}

    - {% bootstrap_field form.phone layout="horizontal" %} - {% bootstrap_field form.wechat layout="horizontal" %} -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -{% endblock %} - -{% block custom_foot_js %} - - -{% endblock %} diff --git a/apps/users/templates/users/user_pubkey_update.html b/apps/users/templates/users/user_pubkey_update.html deleted file mode 100644 index 4ab03f01c..000000000 --- a/apps/users/templates/users/user_pubkey_update.html +++ /dev/null @@ -1,102 +0,0 @@ -{% extends 'base.html' %} -{% load static %} -{% load i18n %} -{% load bootstrap3 %} - -{% block custom_head_css_js %} - - - - - -{% endblock %} -{% block content %} -
    -
    -
    -
    -
    - -
    -
    -
    -
    - {% csrf_token %} -

    {% trans 'Old public key' %}

    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -

    {% trans 'Update public key' %}

    - {% bootstrap_field form.public_key layout="horizontal" %} -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -{% endblock %} - -{% block custom_foot_js %} - - -{% endblock %} diff --git a/apps/users/templates/users/user_remote_app_permission.html b/apps/users/templates/users/user_remote_app_permission.html deleted file mode 100644 index d1f6aabb7..000000000 --- a/apps/users/templates/users/user_remote_app_permission.html +++ /dev/null @@ -1,168 +0,0 @@ -{% extends 'users/_base_user_detail.html' %} -{% load static %} -{% load i18n %} - -{% block custom_head_css_js %} - - -{% endblock %} - -{% block content_table %} -
    -
    -
    - {{ object.name }} -
    - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - -
    {% trans 'Name' %}{% trans 'User' %}{% trans 'User group' %}{% trans 'RemoteApp' %}{% trans 'System user' %}{% trans 'Validity' %}{% trans 'Action' %}
    -
    -
    -
    -{% endblock %} - -{% block custom_foot_js %} - -{% endblock %} diff --git a/apps/users/templates/users/user_update.html b/apps/users/templates/users/user_update.html deleted file mode 100644 index 182ec88aa..000000000 --- a/apps/users/templates/users/user_update.html +++ /dev/null @@ -1,117 +0,0 @@ -{% extends 'users/_user.html' %} -{% load i18n %} -{% load bootstrap3 %} -{% block user_template_title %}{% trans "Update user" %}{% endblock %} -{% block password %} - {% if object.can_update_password %} - {% bootstrap_field form.password layout="horizontal" %} - {# 密码popover #} -
    - -
    - {% else %} -
    - -
    - {% trans 'User auth from {}, go there change password' %} -
    -
    - {% endif %} - {% if object.can_update_ssh_key %} - {% bootstrap_field form.public_key layout="horizontal" %} - {% else %} -
    - -
    - {% trans 'User auth from {}, ssh key login is not supported' %} -
    -
    - {% endif %} -{% endblock %} - -{% block custom_foot_js %} - {{ block.super }} - -{% endblock %}