protected function addDocumentMetadata(array $attributes, NodeInterface $node)
    {
        /** @var ContentContext $contentContext */
        $contentContext = $node->getContext();
        $attributes['data-neos-site-name'] = $contentContext->getCurrentSite()->getName();
        $attributes['data-neos-site-node-context-path'] = $contentContext->getCurrentSiteNode()->getContextPath();
        // Add the workspace of the content repository context to the attributes
        $attributes['data-neos-context-workspace-name'] = $contentContext->getWorkspaceName();
        $attributes['data-neos-context-dimensions'] = json_encode($contentContext->getDimensions());

        if (!$this->nodeAuthorizationService->isGrantedToEditNode($node)) {
            $attributes['data-node-__read-only'] = 'true';
            $attributes['data-nodedatatype-__read-only'] = 'boolean';
        }

        return $attributes;
    }