mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 22:06:28 +00:00
Add RolePermission for API endpoints
This commit is contained in:
@ -29,7 +29,8 @@ from . import serializers as part_serializers
|
||||
|
||||
from InvenTree.views import TreeSerializer
|
||||
from InvenTree.helpers import str2bool, isNull
|
||||
from InvenTree.api import AttachmentMixin
|
||||
from InvenTree.api import AttachmentMixin, RolePermission
|
||||
|
||||
from InvenTree.status_codes import BuildStatus
|
||||
|
||||
|
||||
@ -105,6 +106,12 @@ class CategoryList(generics.ListCreateAPIView):
|
||||
'description',
|
||||
]
|
||||
|
||||
role_required = 'part'
|
||||
|
||||
permission_classes = [
|
||||
RolePermission,
|
||||
]
|
||||
|
||||
|
||||
class CategoryDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
""" API endpoint for detail view of a single PartCategory object """
|
||||
|
Reference in New Issue
Block a user