public function delete(ServerRequestInterface $request)
    {
        if ($this->isReadOnly()) {
            return new NotFoundStatusResponse();
        }

        if ($this->active_object && $this->active_object->isLoaded()) {
            $authenticated_user = $this->getAuthenticatedUser($request);

            if ($this->shouldCheckPermissions() && !$this->canDelete($this->active_object, $authenticated_user)) {
                return new ForbiddenStatusResponse();
            }

            $this->active_object = $this->pool->scrap($this->active_object);

            if ($this->active_object->isNew()) {
                return [
                    'single' => ['id' => $this->active_object->getId()],
                ];
            } else {
                return $this->active_object;
            }
        } else {
            return new NotFoundStatusResponse();
        }
    }