From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id BC3BC20EC88 for ; Thu, 25 Apr 2024 11:32:59 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0F8D11E595; Thu, 25 Apr 2024 11:33:07 +0200 (CEST) From: Dominik Csapak To: pbs-devel@lists.proxmox.com Date: Thu, 25 Apr 2024 11:32:34 +0200 Message-Id: <20240425093234.2192162-2-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240425093234.2192162-1-d.csapak@proxmox.com> References: <20240425093234.2192162-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH widget-toolkit 2/2] realm edit: don't send 'delete' parameter when creating new entry X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" since tha api does not expect a 'delete' parameter here Signed-off-by: Dominik Csapak --- src/window/AuthEditLDAP.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/window/AuthEditLDAP.js b/src/window/AuthEditLDAP.js index f6f7fe0..388fc02 100644 --- a/src/window/AuthEditLDAP.js +++ b/src/window/AuthEditLDAP.js @@ -36,7 +36,7 @@ Ext.define('Proxmox.panel.LDAPInputPanel', { values.type = this.type; } - if (values.anonymous_search) { + if (values.anonymous_search && !this.isCreate) { if (!values.delete) { values.delete = []; } @@ -166,7 +166,9 @@ Ext.define('Proxmox.panel.LDAPInputPanel', { maxValue: 65535, emptyText: gettext('Default'), submitEmptyText: false, - deleteEmpty: true, + cbind: { + deleteEmpty: '{!isCreate}', + }, }, { xtype: 'proxmoxKVComboBox', @@ -369,7 +371,9 @@ Ext.define('Proxmox.panel.LDAPSyncInputPanel', { xtype: 'proxmoxtextfield', name: 'user-classes', fieldLabel: gettext('User classes'), - deleteEmpty: true, + cbind: { + deleteEmpty: '{!isCreate}', + }, emptyText: 'inetorgperson, posixaccount, person, user', autoEl: { tag: 'div', @@ -380,7 +384,9 @@ Ext.define('Proxmox.panel.LDAPSyncInputPanel', { xtype: 'proxmoxtextfield', name: 'filter', fieldLabel: gettext('User Filter'), - deleteEmpty: true, + cbind: { + deleteEmpty: '{!isCreate}', + }, }, ], -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel