Skip to content

Commit f20b22c

Browse files
committed
BUGFIX: Add content element wrapping to restricted nodes
Previously opening a document where some nodes were not permitted to be edited was hard to navigate, as the content element wrapping was not rendered. Clicking into the elements showed no outline and navigation via the content tree was not possible. But more importantly inserting nodes into the content collection were likely misplaced until reloading as the Neos Ui does not understand the structure of the site. Instead - as reading the nodes and its information is permitted and needed for rendering - we will always wrap content elements if editable or not. To avoid having to boot the ckeditor for inline elements we instead evaluate the edit permission there and decide to hide the inline element wrapping. (Previously they would be rendered but not booted because the neos ui didnt had the outer content element wrapping)
1 parent a5b7015 commit f20b22c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Classes/Aspects/AugmentationAspect.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ public function editableElementAugmentation(JoinPointInterface $joinPoint)
145145
return $content;
146146
}
147147

148+
if ($this->nodeAuthorizationService->isGrantedToEditNode($node) === false) {
149+
return $content;
150+
}
151+
148152
$content = $joinPoint->getAdviceChain()->proceed($joinPoint);
149153

150154
$attributes = [
@@ -166,6 +170,6 @@ protected function needsMetadata(NodeInterface $node, $renderCurrentDocumentMeta
166170
/** @var $contentContext ContentContext */
167171
$contentContext = $node->getContext();
168172

169-
return ($contentContext->isInBackend() === true && ($renderCurrentDocumentMetadata === true || $this->nodeAuthorizationService->isGrantedToEditNode($node) === true));
173+
return $contentContext->isInBackend() === true || $renderCurrentDocumentMetadata === true;
170174
}
171175
}

0 commit comments

Comments
 (0)