mirror of https://github.com/jumpserver/jumpserver
fix: 修改用户序列类read_only字段 (#5729)
* fix: 修改用户序列类read_only字段 Co-authored-by: Jiangjie.Bai <32935519+BaiJiangJie@users.noreply.github.com> Co-authored-by: Bai <bugatti_it@163.com>pull/5728/head
parent
83829df70c
commit
5b2649f775
|
@ -27,11 +27,11 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer):
|
|||
choices=PASSWORD_STRATEGY_CHOICES, required=False,
|
||||
label=_('Password strategy'), write_only=True, default=0
|
||||
)
|
||||
mfa_enabled = serializers.BooleanField(label=_('MFA enabled'))
|
||||
mfa_force_enabled = serializers.BooleanField(label=_('MFA force enabled'))
|
||||
mfa_enabled = serializers.BooleanField(read_only=True, label=_('MFA enabled'))
|
||||
mfa_force_enabled = serializers.BooleanField(read_only=True, label=_('MFA force enabled'))
|
||||
mfa_level_display = serializers.ReadOnlyField(source='get_mfa_level_display', label=_('MFA level for display'))
|
||||
login_blocked = serializers.BooleanField(label=_('Login blocked'))
|
||||
is_expired = serializers.BooleanField(label=_('Is expired'))
|
||||
login_blocked = serializers.BooleanField(read_only=True, label=_('Login blocked'))
|
||||
is_expired = serializers.BooleanField(read_only=True, label=_('Is expired'))
|
||||
can_update = serializers.SerializerMethodField(label=_('Can update'))
|
||||
can_delete = serializers.SerializerMethodField(label=_('Can delete'))
|
||||
org_roles = serializers.ListField(
|
||||
|
|
Loading…
Reference in New Issue