Skip to content

Commit

Permalink
Fixes #13237 - Allow unauthenticated api access to content-types.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabi125 authored and jeremystretch committed Jul 27, 2023
1 parent 8b8adfb commit d075e7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions netbox/extras/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
from rest_framework.generics import RetrieveUpdateDestroyAPIView
from rest_framework.permissions import IsAuthenticated
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from rest_framework.routers import APIRootView
Expand Down Expand Up @@ -381,7 +380,7 @@ class ContentTypeViewSet(ReadOnlyModelViewSet):
"""
Read-only list of ContentTypes. Limit results to ContentTypes pertinent to NetBox objects.
"""
permission_classes = (IsAuthenticated,)
permission_classes = [IsAuthenticatedOrLoginNotRequired]
queryset = ContentType.objects.order_by('app_label', 'model')
serializer_class = serializers.ContentTypeSerializer
filterset_class = filtersets.ContentTypeFilterSet
Expand Down

0 comments on commit d075e7a

Please sign in to comment.