mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Override view permissions for plugin list API
- It is necessary for *any* logged in user to view this endpoint - This is how the user determines which plugins are available (e.g. for label printing!)
This commit is contained in:
parent
42f03296d2
commit
052d9770ce
@ -9,6 +9,7 @@ from django.conf.urls import url, include
|
||||
|
||||
from rest_framework import generics
|
||||
from rest_framework import status
|
||||
from rest_framework import permissions
|
||||
from rest_framework.response import Response
|
||||
|
||||
from common.api import GlobalSettingsPermissions
|
||||
@ -22,6 +23,11 @@ class PluginList(generics.ListAPIView):
|
||||
- GET: Return a list of all PluginConfig objects
|
||||
"""
|
||||
|
||||
# Allow any logged in user to read this endpoint
|
||||
# This is necessary to allow certain functionality,
|
||||
# e.g. determining which label printing plugins are available
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
|
||||
serializer_class = PluginSerializers.PluginConfigSerializer
|
||||
queryset = PluginConfig.objects.all()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user