def has_object_permission(self, request, view, obj):
        if request.method in permissions.SAFE_METHODS:
            return True

        return obj.is_owner(request.user)
dataset/ETHPy150Open jsmesami/naovoce/src/utils/api/permissions.py/IsOwnerOrReadOnly.has_object_permission/original