public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH widget-toolkit 1/1] realms: don't send type and delete on creation
Date: Wed,  6 Mar 2024 12:20:58 +0100	[thread overview]
Message-ID: <20240306112104.2486728-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240306112104.2486728-1-d.csapak@proxmox.com>

those are not valid properties for pbs, which is currently the only user
of these panels/windows.

Sending these parameters will result in the api call failing.

When we want to reuse these panels for other products, we'll have to
make them a bit more flexible/generic anyway.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/window/AuthEditLDAP.js   |  8 ++++----
 src/window/AuthEditOpenId.js | 10 ----------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/window/AuthEditLDAP.js b/src/window/AuthEditLDAP.js
index eb9700a..0494d3f 100644
--- a/src/window/AuthEditLDAP.js
+++ b/src/window/AuthEditLDAP.js
@@ -32,10 +32,6 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
     onlineHelp: 'user-realms-ldap',
 
     onGetValues: function(values) {
-	if (this.isCreate) {
-	    values.type = this.type;
-	}
-
 	if (values.anonymous_search) {
 	    if (!values.delete) {
 		values.delete = [];
@@ -51,6 +47,10 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
 	    values.delete.push("password");
 	}
 
+	if (this.isCreate) {
+	    delete values.delete;
+	}
+
 	delete values.anonymous_search;
 
 	return values;
diff --git a/src/window/AuthEditOpenId.js b/src/window/AuthEditOpenId.js
index ca84958..b9648f7 100644
--- a/src/window/AuthEditOpenId.js
+++ b/src/window/AuthEditOpenId.js
@@ -5,16 +5,6 @@ Ext.define('Proxmox.panel.OpenIDInputPanel', {
 
     type: 'openid',
 
-    onGetValues: function(values) {
-	let me = this;
-
-	if (me.isCreate) {
-	    values.type = me.type;
-	}
-
-	return values;
-    },
-
     columnT: [
 	{
 	    xtype: 'textfield',
-- 
2.39.2





  reply	other threads:[~2024-03-06 11:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 11:20 [pbs-devel] [PATCH widget-toolkit/proxmox-backup] adapt to stricter api parameter checks Dominik Csapak
2024-03-06 11:20 ` Dominik Csapak [this message]
2024-03-06 11:20 ` [pbs-devel] [PATCH proxmox-backup 1/6] ui: prune job edit: indent fix Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 2/6] ui: metrics: don't send digest when creating a new influxdbupd host Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 3/6] ui: tape backup job: don't send delete value on creation Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 4/6] ui: prune: fix sending invalid parameters Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 5/6] ui: sync job: don't send delete value on creation Dominik Csapak
2024-03-06 11:21 ` [pbs-devel] [PATCH proxmox-backup 6/6] ui: verify " Dominik Csapak
2024-03-07  9:32 ` [pbs-devel] applied-series: [PATCH widget-toolkit/proxmox-backup] adapt to stricter api parameter checks Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240306112104.2486728-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal