From 9858d79aaa0e280cf775623f56e1cec30697608d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 29 Jul 2015 17:18:41 +0200 Subject: [PATCH] AdminAccountPage: Do not allow to choose a group.. Does not work currently :( refs #9609 refs #9772 --- modules/setup/application/forms/AdminAccountPage.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/setup/application/forms/AdminAccountPage.php b/modules/setup/application/forms/AdminAccountPage.php index 5551ff8d4..a5dd90866 100644 --- a/modules/setup/application/forms/AdminAccountPage.php +++ b/modules/setup/application/forms/AdminAccountPage.php @@ -12,6 +12,8 @@ use Icinga\Authentication\UserGroup\UserGroupBackend; use Icinga\Authentication\UserGroup\LdapUserGroupBackend; use Icinga\Data\ConfigObject; use Icinga\Data\ResourceFactory; +use Icinga\Data\Selectable; +use Icinga\Exception\NotImplementedError; use Icinga\Web\Form; /** @@ -402,6 +404,11 @@ class AdminAccountPage extends Form $groupConfig = new ConfigObject($this->groupConfig); } - return UserGroupBackend::create(null, $groupConfig); + $backend = UserGroupBackend::create(null, $groupConfig); + if (! $backend instanceof Selectable) { + throw new NotImplementedError('Unsupported, until #9772 has been resolved'); + } + + return $backend; } }