* [pmg-devel] [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update
@ 2021-10-27 15:02 Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-api 1/1] api: ldap config: sync with the complete config Dominik Csapak
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2021-10-27 15:02 UTC (permalink / raw)
To: pmg-devel
having to enter the bindpw on each ldap config change is tedious. change
it so that if no password is entered, it will not be changed in the
backend, similar to PVE.
pmg-api:
Dominik Csapak (1):
api: ldap config: sync with the complete config
src/PMG/API2/LDAP.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
pmg-gui:
Dominik Csapak (1):
fix #3648: ldap config: do not send empty bindpw
js/LDAPConfig.js | 6 ++++++
1 file changed, 6 insertions(+)
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pmg-devel] [PATCH pmg-api 1/1] api: ldap config: sync with the complete config
2021-10-27 15:02 [pmg-devel] [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Dominik Csapak
@ 2021-10-27 15:02 ` Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-gui 1/1] fix #3648: ldap config: do not send empty bindpw Dominik Csapak
2021-10-28 20:23 ` [pmg-devel] applied-series: [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Stoiko Ivanov
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2021-10-27 15:02 UTC (permalink / raw)
To: pmg-devel
use the complete config, not only the one from the parameters.
This is necessary to use the saved bindpw when it's not sent
via the api.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/PMG/API2/LDAP.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/API2/LDAP.pm b/src/PMG/API2/LDAP.pm
index e07aae0..d2ee6a4 100644
--- a/src/PMG/API2/LDAP.pm
+++ b/src/PMG/API2/LDAP.pm
@@ -249,7 +249,7 @@ __PACKAGE__->register_method ({
$ids->{$profile}->{$p} = $config->{$p};
}
- $forced_ldap_sync->($profile, $config)
+ $forced_ldap_sync->($profile, $ids->{$profile})
if !$config->{disable};
$cfg->write();
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pmg-devel] [PATCH pmg-gui 1/1] fix #3648: ldap config: do not send empty bindpw
2021-10-27 15:02 [pmg-devel] [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-api 1/1] api: ldap config: sync with the complete config Dominik Csapak
@ 2021-10-27 15:02 ` Dominik Csapak
2021-10-28 20:23 ` [pmg-devel] applied-series: [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Stoiko Ivanov
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2021-10-27 15:02 UTC (permalink / raw)
To: pmg-devel
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 | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/js/LDAPConfig.js b/js/LDAPConfig.js
index 19ec702..d7e4263 100644
--- a/js/LDAPConfig.js
+++ b/js/LDAPConfig.js
@@ -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'),
},
--
2.30.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pmg-devel] applied-series: [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update
2021-10-27 15:02 [pmg-devel] [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-api 1/1] api: ldap config: sync with the complete config Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-gui 1/1] fix #3648: ldap config: do not send empty bindpw Dominik Csapak
@ 2021-10-28 20:23 ` Stoiko Ivanov
2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2021-10-28 20:23 UTC (permalink / raw)
To: Dominik Csapak; +Cc: pmg-devel
huge thanks for the patches - reviewed, tested and
applied :)
On Wed, 27 Oct 2021 17:02:27 +0200
Dominik Csapak <d.csapak@proxmox.com> wrote:
> having to enter the bindpw on each ldap config change is tedious. change
> it so that if no password is entered, it will not be changed in the
> backend, similar to PVE.
>
> pmg-api:
>
> Dominik Csapak (1):
> api: ldap config: sync with the complete config
>
> src/PMG/API2/LDAP.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> pmg-gui:
>
> Dominik Csapak (1):
> fix #3648: ldap config: do not send empty bindpw
>
> js/LDAPConfig.js | 6 ++++++
> 1 file changed, 6 insertions(+)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-28 20:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 15:02 [pmg-devel] [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-api 1/1] api: ldap config: sync with the complete config Dominik Csapak
2021-10-27 15:02 ` [pmg-devel] [PATCH pmg-gui 1/1] fix #3648: ldap config: do not send empty bindpw Dominik Csapak
2021-10-28 20:23 ` [pmg-devel] applied-series: [PATCH pmg-api/pmg-gui] fix #3648: do not require bindpw on every update Stoiko Ivanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox