[icinga-checkins] icinga.org: icingaweb2/feature/actiontable-row-handling-13115: LdapUserGroupBackendForm: purge user_* settings

git at icinga.org git at icinga.org
Wed Nov 16 10:39:04 CET 2016


Module: icingaweb2
Branch: feature/actiontable-row-handling-13115
Commit: 319f648b32af7f2b76075326bec0efa662daf847
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=319f648b32af7f2b76075326bec0efa662daf847

Author: Alexander A. Klimov <alexander.klimov at icinga.com>
Date:   Fri Oct 21 11:48:39 2016 +0200

LdapUserGroupBackendForm: purge user_* settings

refs #10401

---

 .../forms/Config/UserGroup/LdapUserGroupBackendForm.php   |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php b/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php
index 5affd86..8a56237 100644
--- a/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php
+++ b/application/forms/Config/UserGroup/LdapUserGroupBackendForm.php
@@ -92,6 +92,8 @@ class LdapUserGroupBackendForm extends Form
         $this->createGroupConfigElements($defaults, $groupConfigDisabled);
         if (count($userBackends) === 1 || (isset($formData['user_backend']) && $formData['user_backend'] === 'none')) {
             $this->createUserConfigElements($defaults, $userConfigDisabled);
+        } else {
+            $this->createHiddenUserConfigElements();
         }
 
         $this->addElement(
@@ -279,6 +281,17 @@ class LdapUserGroupBackendForm extends Form
     }
 
     /**
+     * Create and add all elements to this form required for the user configuration as hidden
+     */
+    protected function createHiddenUserConfigElements()
+    {
+        $this->addElement('hidden', 'user_class', array('disabled' => true));
+        $this->addElement('hidden', 'user_filter', array('disabled' => true));
+        $this->addElement('hidden', 'user_name_attribute', array('disabled' => true));
+        $this->addElement('hidden', 'user_base_dn', array('disabled' => true));
+    }
+
+    /**
      * Return the names of all configured LDAP resources
      *
      * @return  array



More information about the icinga-checkins mailing list