Reputation: 828
I want to make a Django REST User API with complex permissions as follows:
GET
PUT
POST / DELETE
Unfortunately, I have no idea how to control the view or serializer to allow such permissions. Is there a template how I can exactly control the permissions?
Upvotes: 0
Views: 215
Reputation: 5669
You can write your custom permission according to DRF docs.
And add YourCustomPermission
in your view:
class ExampleView(APIView):
permission_classes = (YourCustomPermission,)
Upvotes: 2