diff --git a/backend/api/views/docker_view.py b/backend/api/views/docker_view.py index 3d6becdc..fb1b0346 100644 --- a/backend/api/views/docker_view.py +++ b/backend/api/views/docker_view.py @@ -20,7 +20,6 @@ class DockerImageViewSet(RetrieveModelMixin, CreateModelMixin, UpdateModelMixin, serializer_class = DockerImageSerializer permission_classes = [DockerPermission, IsAdminUser] - @action(detail=False) def search(self, request: Request) -> Response: self.pagination_class = BasicPagination @@ -53,7 +52,6 @@ def search(self, request: Request) -> Response: return self.get_paginated_response(serializer.data) - @action(detail=True, methods=['PATCH'], url_path='public', permission_classes=[IsAdminUser]) def patch_public(self, request: Request, **_) -> Response: docker_image = self.get_object() @@ -64,8 +62,6 @@ def patch_public(self, request: Request, **_) -> Response: return Response(serializer.data) - - # TODO: Maybe not necessary # https://www.django-rest-framework.org/api-guide/permissions/#overview-of-access-restriction-methods def list(self, request: Request) -> Response: diff --git a/frontend/src/views/admin/DockerImagesView.vue b/frontend/src/views/admin/DockerImagesView.vue index 22ff516e..f1aa089e 100644 --- a/frontend/src/views/admin/DockerImagesView.vue +++ b/frontend/src/views/admin/DockerImagesView.vue @@ -41,13 +41,13 @@ const columns = ref([ { field: 'name', header: 'admin.docker_images.name' }, { field: 'owner', header: 'admin.docker_images.owner' }, ]); -const publicOptions = ref>([ - { value: true, label: 'public' }, - { value: false, label: 'private' }, -]); +// const publicOptions = ref>([ +// { value: true, label: 'public' }, +// { value: false, label: 'private' }, +// ]); const showSafetyGuard = ref(false); -const toggleSafetyGuard = (data: any): void => { +const toggleSafetyGuard = (data: DockerImage): void => { editItem.value.public = !data.public; editItem.value.id = data.id; showSafetyGuard.value = true;