mirror of https://github.com/jumpserver/jumpserver
14 lines
357 B
Python
14 lines
357 B
Python
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)
|