Skip to content

Commit cbd3dba

Browse files
authored
Merge pull request #13 from DrillSergeant/DrillSergeant-fix-rootnode-checked
BUGFIX: Handle checked root-node
2 parents d0c1d3c + b5b9940 commit cbd3dba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/Service/DynamicRoleEditorService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function generateExpandedNodeIdentifiers(MatcherConfiguration $dynamicRo
156156

157157
foreach ($dynamicRoleMatcherConfiguration->getSelectedNodeIdentifiers() as $nodeIdentifier) {
158158
$node = $this->getSiteNode()->getContext()->getNodeByIdentifier($nodeIdentifier);
159-
if ($node && $node->getParent()) {
159+
if ($node && $node->getParent() && $node !== $siteNode) {
160160
// the node itself does not need to be expanded, but all parents should be expanded (so that the node which has the restriction is visible in the tree)
161161
while ($node->getParent() !== $siteNode) {
162162
$node = $node->getParent();

0 commit comments

Comments
 (0)