18👍
✅
Try this:
class IsOwnerOrCuratorOrDirectorOrNotAllowed(permissions.BasePermission):
def has_permission(self, request, view):
user_pk = view.kwargs.get('user_pk', None)
...
Source:stackexchange.com