mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Merge pull request #2773 from SchrodingersGat/plugin-api-permissions
Plugin api permissions
This commit is contained in:
commit
db61c39400
@ -12,11 +12,14 @@ import common.models
|
|||||||
INVENTREE_SW_VERSION = "0.7.0 dev"
|
INVENTREE_SW_VERSION = "0.7.0 dev"
|
||||||
|
|
||||||
# InvenTree API version
|
# InvenTree API version
|
||||||
INVENTREE_API_VERSION = 33
|
INVENTREE_API_VERSION = 34
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Increment this API version number whenever there is a significant change to the API that any clients need to know about
|
Increment this API version number whenever there is a significant change to the API that any clients need to know about
|
||||||
|
|
||||||
|
v34 -> 2022-03-25
|
||||||
|
- Change permissions for "plugin list" API endpoint (now allows any authenticated user)
|
||||||
|
|
||||||
v33 -> 2022-03-24
|
v33 -> 2022-03-24
|
||||||
- Adds "plugins_enabled" information to root API endpoint
|
- Adds "plugins_enabled" information to root API endpoint
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ from django.conf.urls import url, include
|
|||||||
|
|
||||||
from rest_framework import generics
|
from rest_framework import generics
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
|
from rest_framework import permissions
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
|
|
||||||
from common.api import GlobalSettingsPermissions
|
from common.api import GlobalSettingsPermissions
|
||||||
@ -22,6 +23,11 @@ class PluginList(generics.ListAPIView):
|
|||||||
- GET: Return a list of all PluginConfig objects
|
- 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
|
serializer_class = PluginSerializers.PluginConfigSerializer
|
||||||
queryset = PluginConfig.objects.all()
|
queryset = PluginConfig.objects.all()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user