From a1df0347f52384312bd66a431420a70685e85ea6 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 14 Feb 2019 14:36:30 +0100 Subject: [PATCH] AddNodeForm: Don't allow to import imported nodes --- application/forms/AddNodeForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/forms/AddNodeForm.php b/application/forms/AddNodeForm.php index 0a3f8b6..fe38d35 100644 --- a/application/forms/AddNodeForm.php +++ b/application/forms/AddNodeForm.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Businessprocess\Forms; use Icinga\Module\Businessprocess\BpNode; use Icinga\Module\Businessprocess\BpConfig; +use Icinga\Module\Businessprocess\ImportedNode; use Icinga\Module\Businessprocess\Modification\ProcessChanges; use Icinga\Module\Businessprocess\Storage\Storage; use Icinga\Module\Businessprocess\Web\Form\QuickForm; @@ -400,7 +401,7 @@ class AddNodeForm extends QuickForm } foreach ($bp->getNodes() as $node) { - if ($node instanceof BpNode && ! isset($parents[$node->getName()])) { + if (! $node instanceof ImportedNode && $node instanceof BpNode && ! isset($parents[$node->getName()])) { $name = $node->getName(); if ($differentFile) { $name = '@' . $file . ':' . $name;