Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
l y
Jumpserver
Commits
f3a8328a
Commit
f3a8328a
authored
3 years ago
by
xinwen
Browse files
Options
Download
Email Patches
Plain Diff
feat: 用户详情页面显示 手机号,钉钉,企业微信,飞书
parent
39503b63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/locale/zh/LC_MESSAGES/django.po
+19
-19
apps/locale/zh/LC_MESSAGES/django.po
apps/users/models/user.py
+3
-3
apps/users/models/user.py
apps/users/serializers/user.py
+1
-0
apps/users/serializers/user.py
with
23 additions
and
22 deletions
+23
-22
apps/locale/zh/LC_MESSAGES/django.po
+
19
-
19
View file @
f3a8328a
...
...
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-15 1
7:5
9+0800\n"
"POT-Creation-Date: 2021-09-15 1
8:1
9+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
...
...
@@ -1240,13 +1240,13 @@ msgstr "认证令牌"
#: audits/signals_handler.py:68
#: authentication/templates/authentication/login.html:210
#: notifications/backends/__init__.py:11
#: notifications/backends/__init__.py:11
users/models/user.py:659
msgid "WeCom"
msgstr "企业微信"
#: audits/signals_handler.py:69
#: authentication/templates/authentication/login.html:215
#: notifications/backends/__init__.py:12
#: notifications/backends/__init__.py:12
users/models/user.py:660
msgid "DingTalk"
msgstr "钉钉"
...
...
@@ -1788,7 +1788,7 @@ msgid "CAS"
msgstr "CAS"
#: authentication/templates/authentication/login.html:220
#: notifications/backends/__init__.py:14
#: notifications/backends/__init__.py:14
users/models/user.py:661
msgid "FeiShu"
msgstr "飞书"
...
...
@@ -2487,7 +2487,7 @@ msgstr "来自工单"
#: perms/serializers/application/permission.py:18
#: perms/serializers/application/permission.py:38
#: perms/serializers/asset/permission.py:42
#: perms/serializers/asset/permission.py:68 users/serializers/user.py:7
6
#: perms/serializers/asset/permission.py:68 users/serializers/user.py:7
7
msgid "Is valid"
msgstr "账户是否有效"
...
...
@@ -2495,7 +2495,7 @@ msgstr "账户是否有效"
#: perms/serializers/application/permission.py:37
#: perms/serializers/asset/permission.py:43
#: perms/serializers/asset/permission.py:67 users/serializers/user.py:28
#: users/serializers/user.py:7
7
#: users/serializers/user.py:7
8
msgid "Is expired"
msgstr "是否过期"
...
...
@@ -5243,7 +5243,7 @@ msgstr ""
msgid "The old password is incorrect"
msgstr "旧密码错误"
#: users/serializers/profile.py:36 users/serializers/user.py:13
7
#: users/serializers/profile.py:36 users/serializers/user.py:13
8
msgid "Password does not match security rules"
msgstr "密码不满足安全规则"
...
...
@@ -5255,7 +5255,7 @@ msgstr "新密码不能是最近 {} 次的密码"
msgid "The newly set password is inconsistent"
msgstr "两次密码不一致"
#: users/serializers/profile.py:121 users/serializers/user.py:7
5
#: users/serializers/profile.py:121 users/serializers/user.py:7
6
msgid "Is first login"
msgstr "首次登录"
...
...
@@ -5293,47 +5293,47 @@ msgstr "是否可删除"
msgid "Can public key authentication"
msgstr "能否公钥认证"
#: users/serializers/user.py:33 users/serializers/user.py:8
2
#: users/serializers/user.py:33 users/serializers/user.py:8
3
msgid "Organization role name"
msgstr "组织角色名称"
#: users/serializers/user.py:7
8
#: users/serializers/user.py:7
9
msgid "Avatar url"
msgstr "头像路径"
#: users/serializers/user.py:8
0
#: users/serializers/user.py:8
1
msgid "Groups name"
msgstr "用户组名"
#: users/serializers/user.py:8
1
#: users/serializers/user.py:8
2
msgid "Source name"
msgstr "用户来源名"
#: users/serializers/user.py:8
3
#: users/serializers/user.py:8
4
msgid "Super role name"
msgstr "超级角色名称"
#: users/serializers/user.py:8
4
#: users/serializers/user.py:8
5
msgid "Total role name"
msgstr "汇总角色名称"
#: users/serializers/user.py:8
6
#: users/serializers/user.py:8
7
msgid "Is wecom bound"
msgstr "是否绑定了企业微信"
#: users/serializers/user.py:8
7
#: users/serializers/user.py:8
8
msgid "Is dingtalk bound"
msgstr "是否绑定了钉钉"
#: users/serializers/user.py:8
8
#: users/serializers/user.py:8
9
msgid "Is feishu bound"
msgstr "是否绑定了飞书"
#: users/serializers/user.py:11
1
#: users/serializers/user.py:11
2
msgid "Role limit to {}"
msgstr "角色只能为 {}"
#: users/serializers/user.py:23
1
#: users/serializers/user.py:23
2
msgid "name not unique"
msgstr "名称重复"
...
...
This diff is collapsed.
Click to expand it.
apps/users/models/user.py
+
3
-
3
View file @
f3a8328a
...
...
@@ -656,9 +656,9 @@ class User(AuthMixin, TokenMixin, RoleMixin, MFAMixin, AbstractUser):
need_update_password
=
models
.
BooleanField
(
default
=
False
,
verbose_name
=
_
(
'Need update password'
)
)
wecom_id
=
models
.
CharField
(
null
=
True
,
default
=
None
,
unique
=
True
,
max_length
=
128
)
dingtalk_id
=
models
.
CharField
(
null
=
True
,
default
=
None
,
unique
=
True
,
max_length
=
128
)
feishu_id
=
models
.
CharField
(
null
=
True
,
default
=
None
,
unique
=
True
,
max_length
=
128
)
wecom_id
=
models
.
CharField
(
null
=
True
,
default
=
None
,
unique
=
True
,
max_length
=
128
,
verbose_name
=
_
(
'WeCom'
)
)
dingtalk_id
=
models
.
CharField
(
null
=
True
,
default
=
None
,
unique
=
True
,
max_length
=
128
,
verbose_name
=
_
(
'DingTalk'
)
)
feishu_id
=
models
.
CharField
(
null
=
True
,
default
=
None
,
unique
=
True
,
max_length
=
128
,
verbose_name
=
_
(
'FeiShu'
)
)
def
__str__
(
self
):
return
'{0.name}({0.username})'
.
format
(
self
)
...
...
This diff is collapsed.
Click to expand it.
apps/users/serializers/user.py
+
1
-
0
View file @
f3a8328a
...
...
@@ -51,6 +51,7 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer):
'date_expired'
,
'date_joined'
,
'last_login'
,
# 日期字段
'created_by'
,
'comment'
,
# 通用字段
'is_wecom_bound'
,
'is_dingtalk_bound'
,
'is_feishu_bound'
,
'wecom_id'
,
'dingtalk_id'
,
'feishu_id'
]
# 包含不太常用的字段,可以没有
fields_verbose
=
fields_small
+
[
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment