[pbs-devel] [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set

Dominik Csapak d.csapak at proxmox.com
Thu Apr 25 11:32:33 CEST 2024


in that case, the type is already part of the url and we must not send
it additionally as an parameter

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

diff --git a/src/window/AuthEditBase.js b/src/window/AuthEditBase.js
index 43a2fd6..0f272e6 100644
--- a/src/window/AuthEditBase.js
+++ b/src/window/AuthEditBase.js
@@ -51,6 +51,7 @@ Ext.define('Proxmox.window.AuthEditBase', {
 			realm: me.realm,
 			xtype: authConfig.ipanel,
 			isCreate: me.isCreate,
+			useTypeInUrl: me.useTypeInUrl,
 			type: me.authType,
 		    },
 		    {
@@ -67,6 +68,7 @@ Ext.define('Proxmox.window.AuthEditBase', {
 		realm: me.realm,
 		xtype: authConfig.ipanel,
 		isCreate: me.isCreate,
+		useTypeInUrl: me.useTypeInUrl,
 		type: me.authType,
 	    }];
 	}
diff --git a/src/window/AuthEditLDAP.js b/src/window/AuthEditLDAP.js
index da83520..f6f7fe0 100644
--- a/src/window/AuthEditLDAP.js
+++ b/src/window/AuthEditLDAP.js
@@ -32,7 +32,7 @@ Ext.define('Proxmox.panel.LDAPInputPanel', {
     onlineHelp: 'user-realms-ldap',
 
     onGetValues: function(values) {
-	if (this.isCreate) {
+	if (this.isCreate && !this.useTypeInUrl) {
 	    values.type = this.type;
 	}
 
diff --git a/src/window/AuthEditOpenId.js b/src/window/AuthEditOpenId.js
index ca84958..08ced99 100644
--- a/src/window/AuthEditOpenId.js
+++ b/src/window/AuthEditOpenId.js
@@ -8,7 +8,7 @@ Ext.define('Proxmox.panel.OpenIDInputPanel', {
     onGetValues: function(values) {
 	let me = this;
 
-	if (me.isCreate) {
+	if (me.isCreate && !me.useTypeInUrl) {
 	    values.type = me.type;
 	}
 
-- 
2.39.2





More information about the pbs-devel mailing list