I have a view:
class DealsView(APIView):
permission_classes = (IsAuthenticated, IsOwnerOrCuratorOrDirectorOrNotAllowed, )
def get(self, request, user_pk):
...
But in order to check the permissions correctly I need to pass user_pk url argument to permission:
class IsOwnerOrCuratorOrDirectorOrNotAllowed(permissions.BasePermission):
def has_permission(self, request, view):
...
By default it doesn't have any arguments except self, request, and view. How can I go through it?