From b8b047a1e4b6907616624b0d8d234f914007da3a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 24 Aug 2016 14:15:40 +0000 Subject: [PATCH] ImportSourceCoreApi: allow to import user groups fixes #11511 --- library/Director/Core/CoreApi.php | 9 ++++++++- library/Director/Import/ImportSourceCoreApi.php | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/library/Director/Core/CoreApi.php b/library/Director/Core/CoreApi.php index 2a3d7df5..c7b467f7 100644 --- a/library/Director/Core/CoreApi.php +++ b/library/Director/Core/CoreApi.php @@ -413,7 +413,14 @@ constants public function getHostGroupObjects() { return $this->getDirectorObjects('HostGroup', 'HostGroup', 'hostgroups', array( - 'display_name' => 'display_name', + 'display_name' => 'display_name', + )); + } + + public function getUserGroupObjects() + { + return $this->getDirectorObjects('UserGroup', 'UserGroup', 'usergroups', array( + 'display_name' => 'display_name', )); } diff --git a/library/Director/Import/ImportSourceCoreApi.php b/library/Director/Import/ImportSourceCoreApi.php index 769c58a1..7d80381d 100644 --- a/library/Director/Import/ImportSourceCoreApi.php +++ b/library/Director/Import/ImportSourceCoreApi.php @@ -62,6 +62,7 @@ class ImportSourceCoreApi extends ImportSourceHook 'Host' => $form->translate('Hosts'), 'HostGroup' => $form->translate('Hostgroups'), 'User' => $form->translate('Users'), + 'UserGroup' => $form->translate('Usergroups'), 'Zone' => $form->translate('Zones'), );