]> git.proxmox.com Git - pmg-gui.git/commitdiff
fix #3648: ldap config: do not send empty bindpw
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 27 Oct 2021 15:02:29 +0000 (17:02 +0200)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 28 Oct 2021 20:17:20 +0000 (22:17 +0200)
so that we can reuse the saved one and the admin does not have
to enter the password on each config change (similar to PVE).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/LDAPConfig.js

index 19ec702efb625befdb3e6b894d9b238da38355f9..d7e426388c930b7d963572eda41807bfd57da4f2 100644 (file)
@@ -28,6 +28,11 @@ Ext.define('PMG.LDAPInputPanel', {
        values.disable = values.enable ? 0 : 1;
        delete values.enable;
 
+       // do not send empty password
+       if (values.bindpw === '') {
+           delete values.bindpw;
+       }
+
        return values;
     },
 
@@ -103,6 +108,7 @@ Ext.define('PMG.LDAPInputPanel', {
                xtype: 'textfield',
                inputType: 'password',
                allowBlank: true,
+               emptyText: gettext('Unchanged'),
                name: 'bindpw',
                fieldLabel: gettext('Password'),
            },