class DatabaseAppPermissionListSerializer(BulkOrgResourceModelSerializer):
    users = StringManyToManyField(many=True, read_only=True)
    user_groups = StringManyToManyField(many=True, read_only=True)
    database_apps = StringManyToManyField(many=True, read_only=True)
    system_users = StringManyToManyField(many=True, read_only=True)
    is_valid = serializers.BooleanField()
    is_expired = serializers.BooleanField()

    class Meta:
        model = models.DatabaseAppPermission
        fields = '__all__'
Esempio n. 2
0
class JenkinsPermissionListSerializer(BulkOrgResourceModelSerializer):
    users = StringManyToManyField(many=True, read_only=True)
    user_groups = StringManyToManyField(many=True, read_only=True)
    jenkins = StringManyToManyField(many=True, read_only=True, source='cis')
    nodes = StringManyToManyField(many=True, read_only=True)
    is_valid = serializers.BooleanField()
    is_expired = serializers.BooleanField()

    class Meta:
        model = CiPermission
        fields = '__all__'
Esempio n. 3
0
class AssetPermissionListSerializer(serializers.ModelSerializer):
    users = StringManyToManyField(many=True, read_only=True)
    user_groups = StringManyToManyField(many=True, read_only=True)
    assets = StringManyToManyField(many=True, read_only=True)
    nodes = StringManyToManyField(many=True, read_only=True)
    system_users = StringManyToManyField(many=True, read_only=True)
    is_valid = serializers.BooleanField()
    is_expired = serializers.BooleanField()

    class Meta:
        model = AssetPermission
        fields = '__all__'
Esempio n. 4
0
class ClassifyListSerializer(serializers.ModelSerializer):
    assets = StringManyToManyField(many=True, read_only=True)
    nodes = StringManyToManyField(many=True, read_only=True)

    # inherit = serializers.SerializerMethodField()

    class Meta:
        model = Classify
        # fields = '__all__'
        fields = [
            'id', 'name', 'model', 'height', 'material_name', 'weight',
            'rated_power', 'device_type', 'snmp_version', 'material',
            'front_pic_file', 'rear_pic_file', 'assets', 'nodes', 'is_active',
            'created_by', 'date_created', 'comment'
        ]
Esempio n. 5
0
class AssetPermissionListSerializer(serializers.ModelSerializer):
    users = StringManyToManyField(many=True, read_only=True)
    user_groups = StringManyToManyField(many=True, read_only=True)
    assets = StringManyToManyField(many=True, read_only=True)
    nodes = StringManyToManyField(many=True, read_only=True)
    system_users = StringManyToManyField(many=True, read_only=True)
    inherit = serializers.SerializerMethodField()

    class Meta:
        model = AssetPermission
        fields = '__all__'

    @staticmethod
    def get_inherit(obj):
        if hasattr(obj, 'inherit'):
            return obj.inherit
        else:
            return None
Esempio n. 6
0
class GalleryListSerializer(serializers.ModelSerializer):
    effects = StringManyToManyField(many=True, read_only=True)

    # inherit = serializers.SerializerMethodField()

    class Meta:
        model = Gallery
        # fields = '__all__'
        fields = [
            'id', 'name', 'music', 'effects', 'music_name', 'is_active',
            'created_by', 'date_created', 'comment'
        ]
Esempio n. 7
0
class VideoCombineListSerializer(serializers.ModelSerializer):
    videos = StringManyToManyField(many=True, read_only=True)

    # inherit = serializers.SerializerMethodField()

    class Meta:
        model = VideoCombine
        # fields = '__all__'
        fields = [
            'id', 'name', 'music', 'gallery', 'effect', 'video_quantity',
            'videos', 'music_name', 'gallery_name', 'effect_name', 'is_active',
            'created_by', 'date_created', 'comment'
        ]
Esempio n. 8
0
class MusicListSerializer(serializers.ModelSerializer):
    gallerys = StringManyToManyField(many=True, read_only=True)
    inherit = serializers.SerializerMethodField()

    class Meta:
        model = Music
        fields = '__all__'

    @staticmethod
    def get_inherit(obj):
        if hasattr(obj, 'inherit'):
            return obj.inherit
        else:
            return None
Esempio n. 9
0
class JenkinsPermissionListCisSerializer(serializers.ModelSerializer):
    cis = StringManyToManyField(many=True, read_only=True)

    class Meta:
        model = CiPermission
        fields = ['cis']
Esempio n. 10
0
class UserGroupListSerializer(UserGroupSerializer):
    users = StringManyToManyField(many=True, read_only=True)