[Answered ]-Django Rest Framework User and UserRole and Permission Handling using Token Authentication

2👍

you can separate users by is_staff property and use, standart rest permission isadminuser, for test you try this simple view

from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response
from rest_framework.views import APIView

class ExampleView(APIView):
    permission_classes = (IsAdminUser,)

    def get(self, request, format=None):
        content = {
            'status': 'request was permitted'
        }
        return Response(content)

Leave a comment