mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
357 B
14 lines
357 B
from rest_framework import serializers
|
|
|
|
|
|
class PermissionAllUserSerializer(serializers.Serializer):
|
|
user = serializers.UUIDField(read_only=True, source='id')
|
|
user_display = serializers.SerializerMethodField()
|
|
|
|
class Meta:
|
|
only_fields = ['id', 'username', 'name']
|
|
|
|
@staticmethod
|
|
def get_user_display(obj):
|
|
return str(obj)
|