From b04e5f401f27df8190893f14d8fdf30aaef96b91 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Wed, 26 Oct 2016 16:40:48 +0200 Subject: [PATCH] Sync: Allow importing / syncing templates Purging a used template will obviously fail. refs #11778 --- library/Director/Import/Sync.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index a8fe247e..b81693b5 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -565,17 +565,6 @@ class Sync $modified = 0; $deleted = 0; foreach ($objects as $object) { - if ($object instanceof IcingaObject && $object->isTemplate()) { - // TODO: allow to sync templates - if ($object->hasBeenModified()) { - throw new IcingaException( - 'Sync is not allowed to modify template "%s"', - $object->object_name - ); - } - continue; - } - if ($object->shouldBeRemoved()) { $object->delete($db); $deleted++;