Project

Profile

Help

Story #8068 » guardian-hardcoded.patch

lmjachky, 03/02/2021 06:53 PM

View differences:

pulp_container/app/registry_api.py
from django.conf import settings
from guardian.mixins import PermissionListMixin
from pulpcore.plugin.models import Artifact, ContentArtifact, UploadChunk
from pulpcore.plugin.files import PulpTemporaryUploadedFile
from rest_framework.exceptions import (
......
return Response(headers=headers, data={"repositories": repositories_names})
class CatalogView(ContainerRegistryApiMixin, ListAPIView):
class CatalogView(ContainerRegistryApiMixin, PermissionListMixin, ListAPIView):
"""
Handles requests to the /v2/_catalog endpoint
"""
......
queryset = models.ContainerDistribution.objects.all().only("base_path")
serializer_class = ContainerCatalogSerializer
pagination_class = ContainerCatalogPagination
permission_required = "container.pull_containerdistribution"
class ContainerTagListSerializer(ModelSerializer):
(2-2/3)