def has_object_permission(self, request, view, obj):

        if request.method in permissions.SAFE_METHODS:
            return True

        return obj == request.user
dataset/ETHPy150Open agconti/cookiecutter-django-rest/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/permissions.py/IsOwnerOrReadOnly.has_object_permission/original