mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-01 15:37:19 +00:00
fix(assets): 修复系统用户导入模版没有密码字段的问题
This commit is contained in:
@@ -149,6 +149,7 @@ class SystemUserListSerializer(SystemUserSerializer):
|
|||||||
class Meta(SystemUserSerializer.Meta):
|
class Meta(SystemUserSerializer.Meta):
|
||||||
fields = [
|
fields = [
|
||||||
'id', 'name', 'username', 'protocol',
|
'id', 'name', 'username', 'protocol',
|
||||||
|
'password', 'public_key', 'private_key',
|
||||||
'login_mode', 'login_mode_display',
|
'login_mode', 'login_mode_display',
|
||||||
'priority', "username_same_with_user",
|
'priority', "username_same_with_user",
|
||||||
'auto_push', 'sudo', 'shell', 'comment',
|
'auto_push', 'sudo', 'shell', 'comment',
|
||||||
@@ -157,6 +158,12 @@ class SystemUserListSerializer(SystemUserSerializer):
|
|||||||
'sftp_root',
|
'sftp_root',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
extra_kwargs = {
|
||||||
|
'password': {"write_only": True},
|
||||||
|
'public_key': {"write_only": True},
|
||||||
|
'private_key': {"write_only": True},
|
||||||
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_eager_loading(cls, queryset):
|
def setup_eager_loading(cls, queryset):
|
||||||
""" Perform necessary eager loading of data. """
|
""" Perform necessary eager loading of data. """
|
||||||
|
Reference in New Issue
Block a user