mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
perf: 用户序列类禁止修改source字段
This commit is contained in:
@@ -68,6 +68,10 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer):
|
|||||||
'can_update', 'can_delete', 'login_blocked', 'org_roles'
|
'can_update', 'can_delete', 'login_blocked', 'org_roles'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
read_only_fields = [
|
||||||
|
'date_joined', 'last_login', 'created_by', 'is_first_login', 'source'
|
||||||
|
]
|
||||||
|
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
'password': {'write_only': True, 'required': False, 'allow_null': True, 'allow_blank': True},
|
'password': {'write_only': True, 'required': False, 'allow_null': True, 'allow_blank': True},
|
||||||
'public_key': {'write_only': True},
|
'public_key': {'write_only': True},
|
||||||
|
Reference in New Issue
Block a user