* [pbs-devel] [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set @ 2024-04-25 9:32 Dominik Csapak 2024-04-25 9:32 ` [pbs-devel] [PATCH widget-toolkit 2/2] realm edit: don't send 'delete' parameter when creating new entry Dominik Csapak 2024-04-25 9:43 ` [pbs-devel] applied-series: [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set Thomas Lamprecht 0 siblings, 2 replies; 3+ messages in thread From: Dominik Csapak @ 2024-04-25 9:32 UTC (permalink / raw) To: pbs-devel 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@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 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] [PATCH widget-toolkit 2/2] realm edit: don't send 'delete' parameter when creating new entry 2024-04-25 9:32 [pbs-devel] [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set Dominik Csapak @ 2024-04-25 9:32 ` Dominik Csapak 2024-04-25 9:43 ` [pbs-devel] applied-series: [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set Thomas Lamprecht 1 sibling, 0 replies; 3+ messages in thread From: Dominik Csapak @ 2024-04-25 9:32 UTC (permalink / raw) To: pbs-devel since tha api does not expect a 'delete' parameter here Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [pbs-devel] applied-series: [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set 2024-04-25 9:32 [pbs-devel] [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set Dominik Csapak 2024-04-25 9:32 ` [pbs-devel] [PATCH widget-toolkit 2/2] realm edit: don't send 'delete' parameter when creating new entry Dominik Csapak @ 2024-04-25 9:43 ` Thomas Lamprecht 1 sibling, 0 replies; 3+ messages in thread From: Thomas Lamprecht @ 2024-04-25 9:43 UTC (permalink / raw) To: Proxmox Backup Server development discussion, Dominik Csapak Am 25/04/2024 um 11:32 schrieb Dominik Csapak: > 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@proxmox.com> > --- > src/window/AuthEditBase.js | 2 ++ > src/window/AuthEditLDAP.js | 2 +- > src/window/AuthEditOpenId.js | 2 +- > 3 files changed, 4 insertions(+), 2 deletions(-) > > applied series, thanks! _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-25 9:43 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-04-25 9:32 [pbs-devel] [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set Dominik Csapak 2024-04-25 9:32 ` [pbs-devel] [PATCH widget-toolkit 2/2] realm edit: don't send 'delete' parameter when creating new entry Dominik Csapak 2024-04-25 9:43 ` [pbs-devel] applied-series: [PATCH widget-toolkit 1/2] realm edit: don't send type as extra parameter when 'useTypeInUrl' is set Thomas Lamprecht
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox