From c600ff1b63ea45e6020d980736f2f749b76e8be8 Mon Sep 17 00:00:00 2001 From: Ina Panova Date: Tue, 2 Feb 2021 17:08:13 +0100 Subject: [PATCH] As an authenticated user I can create and view artifacts. closes #8193 --- CHANGES/8193.feature | 1 + pulpcore/app/viewsets/content.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 CHANGES/8193.feature diff --git a/CHANGES/8193.feature b/CHANGES/8193.feature new file mode 100644 index 0000000000..d77df31393 --- /dev/null +++ b/CHANGES/8193.feature @@ -0,0 +1 @@ +As an authenticated user I can create and view artifacts. diff --git a/pulpcore/app/viewsets/content.py b/pulpcore/app/viewsets/content.py index 8bf52c965b..d546f21c26 100644 --- a/pulpcore/app/viewsets/content.py +++ b/pulpcore/app/viewsets/content.py @@ -1,7 +1,7 @@ from gettext import gettext as _ from django.db import models -from rest_framework import mixins, status +from rest_framework import mixins, permissions, status from rest_framework.response import Response from pulpcore.app.models import Artifact, Content, SigningService @@ -55,6 +55,7 @@ class ArtifactViewSet( queryset = Artifact.objects.all() serializer_class = ArtifactSerializer filterset_class = ArtifactFilter + permission_classes = (permissions.IsAuthenticated,) def destroy(self, request, pk): """