Skip to content

Commit

Permalink
Merge pull request #13 from DrillSergeant/DrillSergeant-fix-rootnode-…
Browse files Browse the repository at this point in the history
…checked

BUGFIX: Handle checked root-node
  • Loading branch information
skurfuerst authored Oct 23, 2020
2 parents d0c1d3c + b5b9940 commit cbd3dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Service/DynamicRoleEditorService.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private function generateExpandedNodeIdentifiers(MatcherConfiguration $dynamicRo

foreach ($dynamicRoleMatcherConfiguration->getSelectedNodeIdentifiers() as $nodeIdentifier) {
$node = $this->getSiteNode()->getContext()->getNodeByIdentifier($nodeIdentifier);
if ($node && $node->getParent()) {
if ($node && $node->getParent() && $node !== $siteNode) {
// 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)
while ($node->getParent() !== $siteNode) {
$node = $node->getParent();
Expand Down

0 comments on commit cbd3dba

Please sign in to comment.