Browse Source

perf: 用户序列类禁止修改source字段

pull/5195/head
Bai 4 years ago committed by Jiangjie.Bai
parent
commit
4c3a655239
  1. 4
      apps/users/serializers/user.py

4
apps/users/serializers/user.py

@ -68,6 +68,10 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer):
'can_update', 'can_delete', 'login_blocked', 'org_roles'
]
read_only_fields = [
'date_joined', 'last_login', 'created_by', 'is_first_login', 'source'
]
extra_kwargs = {
'password': {'write_only': True, 'required': False, 'allow_null': True, 'allow_blank': True},
'public_key': {'write_only': True},

Loading…
Cancel
Save