From 94f8745fc0d65f46dc49ecbdeee2c7d1da80ac24 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 15 Oct 2014 10:46:40 +0200 Subject: [PATCH] Fix authentication backend validation --- .../forms/Config/AuthenticationBackendConfigForm.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/application/forms/Config/AuthenticationBackendConfigForm.php b/application/forms/Config/AuthenticationBackendConfigForm.php index 2e4b1d0fd..3cbd4b48e 100644 --- a/application/forms/Config/AuthenticationBackendConfigForm.php +++ b/application/forms/Config/AuthenticationBackendConfigForm.php @@ -10,6 +10,7 @@ use Icinga\Form\ConfigForm; use Icinga\Web\Notification; use Icinga\Application\Config; use Icinga\Application\Platform; +use Icinga\Data\ResourceFactory; use Icinga\Exception\ConfigurationError; use Icinga\Form\Config\Authentication\DbBackendForm; use Icinga\Form\Config\Authentication\LdapBackendForm; @@ -319,4 +320,14 @@ class AuthenticationBackendConfigForm extends ConfigForm $this->addElements($this->getBackendForm($backendType)->createElements($formData)->getElements()); } + + /** + * Return the configuration for the chosen resource + * + * @return Zend_Config + */ + public function getResourceConfig() + { + return ResourceFactory::getResourceConfig($this->getValue('resource')); + } }