fix(systemuser): 系统用户添加 ad_domain 字段

This commit is contained in:
xinwen
2020-10-28 19:13:43 +08:00
committed by 老广
parent 7031b7f28b
commit 5e779e6542
3 changed files with 23 additions and 4 deletions

View File

@@ -6,7 +6,6 @@ from common.serializers import AdaptedBulkListSerializer
from common.mixins.serializers import BulkSerializerMixin
from common.utils import ssh_pubkey_gen
from orgs.mixins.serializers import BulkOrgResourceModelSerializer
from assets.models import Node
from ..models import SystemUser, Asset
from .base import AuthSerializerMixin
@@ -35,7 +34,7 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
'auto_push', 'cmd_filters', 'sudo', 'shell', 'comment',
'auto_generate_key', 'sftp_root', 'token',
'assets_amount', 'date_created', 'created_by',
'home', 'system_groups'
'home', 'system_groups', 'ad_domain'
]
extra_kwargs = {
'password': {"write_only": True},
@@ -154,7 +153,7 @@ class SystemUserListSerializer(SystemUserSerializer):
'priority', "username_same_with_user",
'auto_push', 'sudo', 'shell', 'comment',
"assets_amount", 'home', 'system_groups',
'auto_generate_key',
'auto_generate_key', 'ad_domain',
'sftp_root',
]
@@ -179,7 +178,8 @@ class SystemUserWithAuthInfoSerializer(SystemUserSerializer):
'login_mode', 'login_mode_display',
'priority', 'username_same_with_user',
'auto_push', 'sudo', 'shell', 'comment',
'auto_generate_key', 'sftp_root', 'token'
'auto_generate_key', 'sftp_root', 'token',
'ad_domain',
]
extra_kwargs = {
'nodes_amount': {'label': _('Node')},