diff --git a/apps/acls/migrations/0002_auto_20210926_1047.py b/apps/acls/migrations/0002_auto_20210926_1047.py index fa45cd25a..c43c4b807 100644 --- a/apps/acls/migrations/0002_auto_20210926_1047.py +++ b/apps/acls/migrations/0002_auto_20210926_1047.py @@ -86,4 +86,12 @@ class Migration(migrations.Migration): model_name='loginacl', name='ip_group', ), + migrations.AlterModelOptions( + name='loginacl', + options={'ordering': ('priority', '-date_updated', 'name'), 'verbose_name': 'Login acl'}, + ), + migrations.AlterModelOptions( + name='loginassetacl', + options={'ordering': ('priority', '-date_updated', 'name'), 'verbose_name': 'Login asset acl'}, + ), ] diff --git a/apps/acls/models/login_acl.py b/apps/acls/models/login_acl.py index bf69c1018..bdc1c8d9e 100644 --- a/apps/acls/models/login_acl.py +++ b/apps/acls/models/login_acl.py @@ -40,6 +40,7 @@ class LoginACL(BaseACL): class Meta: ordering = ('priority', '-date_updated', 'name') + verbose_name = _('Login acl') def __str__(self): return self.name diff --git a/apps/acls/models/login_asset_acl.py b/apps/acls/models/login_asset_acl.py index bf47fa578..0bde3c14f 100644 --- a/apps/acls/models/login_asset_acl.py +++ b/apps/acls/models/login_asset_acl.py @@ -37,6 +37,7 @@ class LoginAssetACL(BaseACL, OrgModelMixin): class Meta: unique_together = ('name', 'org_id') ordering = ('priority', '-date_updated', 'name') + verbose_name = _('Login asset acl') def __str__(self): return self.name diff --git a/apps/applications/migrations/0013_auto_20211026_1711.py b/apps/applications/migrations/0013_auto_20211026_1711.py new file mode 100644 index 000000000..28d80cdbc --- /dev/null +++ b/apps/applications/migrations/0013_auto_20211026_1711.py @@ -0,0 +1,17 @@ +# Generated by Django 3.1.13 on 2021-10-26 09:11 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('applications', '0012_auto_20211014_2209'), + ] + + operations = [ + migrations.AlterModelOptions( + name='application', + options={'ordering': ('name',), 'verbose_name': 'Application'}, + ), + ] diff --git a/apps/applications/models/application.py b/apps/applications/models/application.py index 7b641b7c4..5df8e3dfd 100644 --- a/apps/applications/models/application.py +++ b/apps/applications/models/application.py @@ -180,6 +180,7 @@ class Application(CommonModelMixin, OrgModelMixin, ApplicationTreeNodeMixin): ) class Meta: + verbose_name = _('Application') unique_together = [('org_id', 'name')] ordering = ('name',) diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 1649f5247..76db7d1d4 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-25 16:48+0800\n" +"POT-Creation-Date: 2021-10-26 17:16+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -74,7 +74,7 @@ msgstr "拒绝" msgid "Allow" msgstr "允许" -#: acls/models/login_acl.py:21 acls/models/login_acl.py:113 +#: acls/models/login_acl.py:21 acls/models/login_acl.py:114 #: acls/models/login_asset_acl.py:17 tickets/const.py:9 msgid "Login confirm" msgstr "登录复核" @@ -116,14 +116,20 @@ msgstr "动作" msgid "Reviewers" msgstr "审批人" +#: acls/models/login_acl.py:43 +msgid "Login acl" +msgstr "登录访问控制" + #: acls/models/login_asset_acl.py:21 +#: applications/serializers/application.py:108 +#: applications/serializers/application.py:139 msgid "System User" msgstr "系统用户" #: acls/models/login_asset_acl.py:22 #: applications/serializers/attrs/application_category/remote_app.py:37 #: assets/models/asset.py:357 assets/models/authbook.py:18 -#: assets/models/gathered_user.py:14 assets/serializers/system_user.py:230 +#: assets/models/gathered_user.py:14 assets/serializers/system_user.py:233 #: audits/models.py:38 perms/models/asset_permission.py:99 #: templates/index.html:82 terminal/backends/command/models.py:19 #: terminal/backends/command/serializers.py:13 terminal/models/session.py:40 @@ -135,7 +141,11 @@ msgstr "系统用户" msgid "Asset" msgstr "资产" -#: acls/models/login_asset_acl.py:89 tickets/const.py:12 +#: acls/models/login_asset_acl.py:40 +msgid "Login asset acl" +msgstr "登录资产访问控制" + +#: acls/models/login_asset_acl.py:90 tickets/const.py:12 msgid "Login asset confirm" msgstr "登录资产复核" @@ -153,7 +163,7 @@ msgstr "格式为逗号分隔的字符串, * 表示匹配所有. " #: audits/models.py:105 authentication/forms.py:15 authentication/forms.py:17 #: authentication/templates/authentication/_msg_different_city.html:9 #: ops/models/adhoc.py:148 users/forms/profile.py:31 users/models/user.py:595 -#: users/templates/users/_msg_user_created.html:10 +#: users/templates/users/_msg_user_created.html:12 #: users/templates/users/_select_user_modal.html:14 #: xpack/plugins/change_auth_plan/models/asset.py:35 #: xpack/plugins/change_auth_plan/models/asset.py:191 @@ -312,6 +322,11 @@ msgstr "网域" msgid "Attrs" msgstr "" +#: applications/models/application.py:183 +#: perms/models/application_permission.py:27 users/models/user.py:174 +msgid "Application" +msgstr "应用程序" + #: applications/serializers/application.py:59 #: applications/serializers/application.py:89 assets/serializers/label.py:13 #: perms/serializers/application/permission.py:16 @@ -330,6 +345,7 @@ msgid "Type display" msgstr "类型名称" #: applications/serializers/application.py:107 +#: applications/serializers/application.py:138 msgid "Application display" msgstr "应用名称" @@ -384,7 +400,7 @@ msgstr "目标URL" #: authentication/forms.py:22 #: authentication/templates/authentication/login.html:151 #: settings/serializers/auth/ldap.py:44 users/forms/profile.py:21 -#: users/templates/users/_msg_user_created.html:11 +#: users/templates/users/_msg_user_created.html:13 #: 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 @@ -747,7 +763,7 @@ msgstr "全称" msgid "Parent key" msgstr "ssh私钥" -#: assets/models/node.py:559 assets/serializers/system_user.py:229 +#: assets/models/node.py:559 assets/serializers/system_user.py:232 #: users/templates/users/user_asset_permission.html:41 #: users/templates/users/user_asset_permission.html:73 #: users/templates/users/user_asset_permission.html:158 @@ -848,7 +864,7 @@ msgstr "节点名称" msgid "Hardware info" msgstr "硬件信息" -#: assets/serializers/asset.py:104 assets/serializers/system_user.py:248 +#: assets/serializers/asset.py:104 assets/serializers/system_user.py:251 #: orgs/mixins/serializers.py:26 msgid "Org name" msgstr "组织名称" @@ -862,7 +878,7 @@ msgid "private key invalid" msgstr "密钥不合法" #: assets/serializers/domain.py:13 assets/serializers/label.py:12 -#: assets/serializers/system_user.py:53 +#: assets/serializers/system_user.py:56 #: perms/serializers/asset/permission.py:72 msgid "Assets amount" msgstr "资产数量" @@ -892,48 +908,52 @@ msgstr "同级别节点名字不能重复" msgid "SSH key fingerprint" msgstr "密钥指纹" -#: assets/serializers/system_user.py:52 +#: assets/serializers/system_user.py:30 +msgid "Apps amount" +msgstr "应用数量" + +#: assets/serializers/system_user.py:55 #: perms/serializers/asset/permission.py:73 msgid "Nodes amount" msgstr "节点数量" -#: assets/serializers/system_user.py:54 assets/serializers/system_user.py:231 +#: assets/serializers/system_user.py:57 assets/serializers/system_user.py:234 msgid "Login mode display" msgstr "认证方式名称" -#: assets/serializers/system_user.py:56 +#: assets/serializers/system_user.py:59 msgid "Ad domain" msgstr "Ad 网域" -#: assets/serializers/system_user.py:57 +#: assets/serializers/system_user.py:60 msgid "Is asset protocol" msgstr "" -#: assets/serializers/system_user.py:97 +#: assets/serializers/system_user.py:100 msgid "Username same with user with protocol {} only allow 1" msgstr "用户名和用户相同的一种协议只允许存在一个" -#: assets/serializers/system_user.py:107 common/validators.py:14 +#: assets/serializers/system_user.py:110 common/validators.py:14 msgid "Special char not allowed" msgstr "不能包含特殊字符" -#: assets/serializers/system_user.py:116 +#: assets/serializers/system_user.py:119 msgid "* Automatic login mode must fill in the username." msgstr "自动登录模式,必须填写用户名" -#: assets/serializers/system_user.py:131 +#: assets/serializers/system_user.py:134 msgid "Path should starts with /" msgstr "路径应该以 / 开头" -#: assets/serializers/system_user.py:143 +#: assets/serializers/system_user.py:146 msgid "Password or private key required" msgstr "密码或密钥密码需要一个" -#: assets/serializers/system_user.py:247 +#: assets/serializers/system_user.py:250 msgid "System user name" msgstr "系统用户名称" -#: assets/serializers/system_user.py:257 +#: assets/serializers/system_user.py:260 msgid "Asset hostname" msgstr "资产主机名" @@ -1253,12 +1273,12 @@ msgstr "" msgid "Auth Token" msgstr "认证令牌" -#: audits/signals_handler.py:68 authentication/views/login.py:168 +#: audits/signals_handler.py:68 authentication/views/login.py:169 #: notifications/backends/__init__.py:11 users/models/user.py:652 msgid "WeCom" msgstr "企业微信" -#: audits/signals_handler.py:69 authentication/views/login.py:174 +#: audits/signals_handler.py:69 authentication/views/login.py:175 #: notifications/backends/__init__.py:12 users/models/user.py:653 msgid "DingTalk" msgstr "钉钉" @@ -1420,7 +1440,7 @@ msgstr "{ApplicationPermission} 移除 {UserGroup}" #: audits/signals_handler.py:157 perms/models/application_permission.py:37 msgid "Application permission" -msgstr "应用管理" +msgstr "应用授权" #: audits/signals_handler.py:158 #, python-brace-format @@ -1625,38 +1645,50 @@ msgstr "等待登录复核处理" msgid "Login confirm ticket was {}" msgstr "登录复核 {}" -#: authentication/errors.py:261 +#: authentication/errors.py:265 msgid "IP is not allowed" msgstr "来源 IP 不被允许登录" -#: authentication/errors.py:268 +#: authentication/errors.py:272 msgid "Time Period is not allowed" msgstr "该 时间段 不被允许登录" -#: authentication/errors.py:301 +#: authentication/errors.py:305 msgid "SSO auth closed" msgstr "SSO 认证关闭了" -#: authentication/errors.py:306 authentication/mixins.py:340 +#: authentication/errors.py:310 authentication/mixins.py:345 msgid "Your password is too simple, please change it for security" msgstr "你的密码过于简单,为了安全,请修改" -#: authentication/errors.py:315 authentication/mixins.py:347 +#: authentication/errors.py:319 authentication/mixins.py:352 msgid "You should to change your password before login" msgstr "登录完成前,请先修改密码" -#: authentication/errors.py:324 authentication/mixins.py:354 +#: authentication/errors.py:328 authentication/mixins.py:359 msgid "Your password has expired, please reset before logging in" msgstr "您的密码已过期,先修改再登录" -#: authentication/errors.py:358 +#: authentication/errors.py:362 msgid "Your password is invalid" msgstr "您的密码无效" -#: authentication/errors.py:364 +#: authentication/errors.py:368 msgid "No upload or download permission" msgstr "没有上传下载权限" +#: authentication/errors.py:384 templates/_mfa_otp_login.html:37 +msgid "Please enter MFA code" +msgstr "请输入6位动态安全码" + +#: authentication/errors.py:387 templates/_mfa_otp_login.html:38 +msgid "Please enter SMS code" +msgstr "请输入短信验证码" + +#: authentication/errors.py:390 users/exceptions.py:15 +msgid "Phone not set" +msgstr "手机号没有设置" + #: authentication/forms.py:35 msgid "{} days auto login" msgstr "{} 天内自动登录" @@ -1677,11 +1709,11 @@ msgstr "多因子认证验证码" msgid "Dynamic code" msgstr "动态码" -#: authentication/mixins.py:330 +#: authentication/mixins.py:335 msgid "Please change your password" msgstr "请修改密码" -#: authentication/mixins.py:515 +#: authentication/mixins.py:523 msgid "SMS" msgstr "短信" @@ -1827,12 +1859,12 @@ msgid "Click here reset password" msgstr "点击这里重置密码" #: authentication/templates/authentication/_msg_reset_password.html:15 -#: users/templates/users/_msg_user_created.html:17 +#: users/templates/users/_msg_user_created.html:19 msgid "This link is valid for 1 hour. After it expires" msgstr "这个链接有效期1小时, 超过时间您可以" #: authentication/templates/authentication/_msg_reset_password.html:17 -#: users/templates/users/_msg_user_created.html:18 +#: users/templates/users/_msg_user_created.html:20 msgid "request new one" msgstr "重新申请" @@ -1996,12 +2028,12 @@ msgstr "正在跳转到 {} 认证" msgid "Please enable cookies and try again." msgstr "设置你的浏览器支持cookie" -#: authentication/views/login.py:180 notifications/backends/__init__.py:14 +#: authentication/views/login.py:181 notifications/backends/__init__.py:14 #: users/models/user.py:654 msgid "FeiShu" msgstr "飞书" -#: authentication/views/login.py:268 +#: authentication/views/login.py:269 msgid "" "Wait for {} confirm, You also can copy link to her/him
\n" " Don't close this page" @@ -2009,15 +2041,15 @@ msgstr "" "等待 {} 确认, 你也可以复制链接发给他/她
\n" " 不要关闭本页面" -#: authentication/views/login.py:273 +#: authentication/views/login.py:274 msgid "No ticket found" msgstr "没有发现工单" -#: authentication/views/login.py:305 +#: authentication/views/login.py:306 msgid "Logout success" msgstr "退出登录成功" -#: authentication/views/login.py:306 +#: authentication/views/login.py:307 msgid "Logout success, return login page" msgstr "退出登录成功,返回到登录页面" @@ -2204,12 +2236,11 @@ msgstr "不能包含特殊字符" msgid "The mobile phone number format is incorrect" msgstr "手机号格式不正确" -#: jumpserver/conf.py:268 settings/serializers/email.py:51 +#: jumpserver/conf.py:268 msgid "Create account successfully" msgstr "创建账户成功" -#: jumpserver/conf.py:270 settings/serializers/email.py:63 -#: users/templates/users/_msg_user_created.html:8 +#: jumpserver/conf.py:270 msgid "Your account has been created successfully" msgstr "你的账户已创建成功" @@ -2253,7 +2284,7 @@ msgstr "邮件" msgid "Site message" msgstr "站内信" -#: notifications/notifications.py:170 ops/models/adhoc.py:246 +#: notifications/notifications.py:172 ops/models/adhoc.py:246 #: xpack/plugins/change_auth_plan/models/base.py:108 #: xpack/plugins/change_auth_plan/models/base.py:190 #: xpack/plugins/gathered_user/models.py:79 @@ -2473,10 +2504,6 @@ msgstr "管理员正在修改授权,请稍等" msgid "The authorization cannot be revoked for the time being" msgstr "该授权暂时不能撤销" -#: perms/models/application_permission.py:27 users/models/user.py:174 -msgid "Application" -msgstr "应用程序" - #: perms/models/asset_permission.py:37 settings/serializers/terminal.py:12 msgid "All" msgstr "全部" @@ -2927,7 +2954,7 @@ msgid "SMS provider" msgstr "短信服务商" #: settings/serializers/auth/sms.py:17 settings/serializers/auth/sms.py:35 -#: settings/serializers/auth/sms.py:43 +#: settings/serializers/auth/sms.py:43 settings/serializers/email.py:63 msgid "Signature" msgstr "签名" @@ -3104,27 +3131,26 @@ msgid "" "successfully)" msgstr "提示: 创建用户时,发送设置密码邮件的主题 (例如: 创建用户成功)" -#: settings/serializers/email.py:55 +#: settings/serializers/email.py:54 msgid "Create user honorific" msgstr "邮件问候语" -#: settings/serializers/email.py:56 -#, python-brace-format -msgid "Hello {name}" -msgstr "你好 {name}" - -#: settings/serializers/email.py:57 +#: settings/serializers/email.py:55 msgid "Tips: When creating a user, send the honorific of the email (eg:Hello)" msgstr "提示: 创建用户时,发送设置密码邮件的敬语 (例如: 你好)" -#: settings/serializers/email.py:61 +#: settings/serializers/email.py:59 msgid "Create user email content" msgstr "邮件的内容" -#: settings/serializers/email.py:62 +#: settings/serializers/email.py:60 msgid "Tips:When creating a user, send the content of the email" msgstr "提示: 创建用户时,发送设置密码邮件的内容" +#: settings/serializers/email.py:64 +msgid "Tips: Email signature (eg:jumpserver)" +msgstr "邮件署名 (如:jumpserver)" + #: settings/serializers/other.py:7 msgid "Email suffix" msgstr "邮件后缀" @@ -3678,14 +3704,6 @@ msgstr "请输入验证码" msgid "Send verification code" msgstr "发送验证码" -#: templates/_mfa_otp_login.html:37 -msgid "Please enter MFA code" -msgstr "请输入6位动态安全码" - -#: templates/_mfa_otp_login.html:38 -msgid "Please enter SMS code" -msgstr "请输入短信验证码" - #: templates/_mfa_otp_login.html:60 templates/_mfa_otp_login.html:65 msgid "Wait: " msgstr "等待:" @@ -4473,35 +4491,35 @@ msgid "" msgstr "" "通过工单创建, 工单标题: {}, 工单申请人: {}, 工单处理人: {}, 工单 ID: {}" -#: tickets/handler/base.py:86 +#: tickets/handler/base.py:88 msgid "{} {} the ticket" msgstr "{} {} 工单" -#: tickets/handler/base.py:114 +#: tickets/handler/base.py:116 msgid "Ticket title" msgstr "工单标题" -#: tickets/handler/base.py:115 +#: tickets/handler/base.py:117 msgid "Ticket type" msgstr "工单类型" -#: tickets/handler/base.py:116 +#: tickets/handler/base.py:118 msgid "Ticket status" msgstr "工单状态" -#: tickets/handler/base.py:117 +#: tickets/handler/base.py:119 msgid "Ticket applicant" msgstr "工单申请人" -#: tickets/handler/base.py:119 +#: tickets/handler/base.py:121 msgid "Ticket basic info" msgstr "工单基本信息" -#: tickets/handler/base.py:130 +#: tickets/handler/base.py:132 msgid "No content" msgstr "无内容" -#: tickets/handler/base.py:132 +#: tickets/handler/base.py:134 msgid "Ticket applied info" msgstr "工单申请信息" @@ -4783,10 +4801,6 @@ msgstr "设置密码" msgid "MFA not enabled" msgstr "MFA没有开启" -#: users/exceptions.py:15 -msgid "Phone not set" -msgstr "手机号没有设置" - #: users/exceptions.py:20 msgid "MFA method not support" msgstr "MFA 方法不支持" @@ -4915,30 +4929,30 @@ msgstr "管理员" msgid "Administrator is the super user of system" msgstr "Administrator是初始的超级管理员" -#: users/notifications.py:56 +#: users/notifications.py:48 #: users/templates/users/_msg_password_expire_reminder.html:17 #: users/templates/users/reset_password.html:5 #: users/templates/users/reset_password.html:6 msgid "Reset password" msgstr "重置密码" -#: users/notifications.py:86 users/views/profile/reset.py:127 +#: users/notifications.py:78 users/views/profile/reset.py:127 msgid "Reset password success" msgstr "重置密码成功" -#: users/notifications.py:112 +#: users/notifications.py:104 msgid "Password is about expire" msgstr "密码即将过期" -#: users/notifications.py:140 +#: users/notifications.py:132 msgid "Account is about expire" msgstr "账号即将过期" -#: users/notifications.py:162 +#: users/notifications.py:154 msgid "Reset SSH Key" msgstr "重置 SSH 密钥" -#: users/notifications.py:183 +#: users/notifications.py:175 msgid "Reset MFA" msgstr "重置 MFA" @@ -5108,7 +5122,7 @@ msgstr "点击这里设置" msgid "Your ssh public key has been reset by site administrator" msgstr "你的 SSH 密钥已经被管理员重置" -#: users/templates/users/_msg_user_created.html:13 +#: users/templates/users/_msg_user_created.html:15 msgid "click here to set your password" msgstr "点击这里设置密码" @@ -5363,8 +5377,8 @@ msgstr "* 新密码不能是最近 {} 次的密码" msgid "Reset password success, return to login page" msgstr "重置密码成功,返回到登录页面" -#: xpack/plugins/change_auth_plan/api/app.py:113 -#: xpack/plugins/change_auth_plan/api/asset.py:100 +#: xpack/plugins/change_auth_plan/api/app.py:114 +#: xpack/plugins/change_auth_plan/api/asset.py:101 msgid "The parameter 'action' must be [{}]" msgstr "参数 'action' 必须是 [{}]" @@ -5495,15 +5509,15 @@ msgstr "* 请输入正确的密码长度" msgid "* Password length range 6-30 bits" msgstr "* 密码长度范围 6-30 位" -#: xpack/plugins/change_auth_plan/task_handlers/base/handler.py:248 +#: xpack/plugins/change_auth_plan/task_handlers/base/handler.py:249 msgid "Invalid/incorrect password" msgstr "无效/错误 密码" -#: xpack/plugins/change_auth_plan/task_handlers/base/handler.py:250 +#: xpack/plugins/change_auth_plan/task_handlers/base/handler.py:251 msgid "Failed to connect to the host" msgstr "连接主机失败" -#: xpack/plugins/change_auth_plan/task_handlers/base/handler.py:252 +#: xpack/plugins/change_auth_plan/task_handlers/base/handler.py:253 msgid "Data could not be sent to remote" msgstr "无法将数据发送到远程" @@ -5861,7 +5875,7 @@ msgstr "执行次数" msgid "Instance count" msgstr "实例个数" -#: xpack/plugins/cloud/utils.py:65 +#: xpack/plugins/cloud/utils.py:68 msgid "Account unavailable" msgstr "账户无效" @@ -5949,8 +5963,9 @@ msgstr "旗舰版" msgid "Community edition" msgstr "社区版" -#~ msgid "Tips: Email signature (eg:jumpserver)" -#~ msgstr "邮件署名 (如:jumpserver)" +#, python-brace-format +#~ msgid "Hello {name}" +#~ msgstr "你好 {name}" #~ msgid "Login direct" #~ msgstr "直接登录"