[pve-devel] [PATCH manager 2/3] ui: user edit: hide key field except for legacy values
Fiona Ebner
f.ebner at proxmox.com
Fri Feb 9 14:08:20 CET 2024
It should not be possible to set new legacy values via the UI, the TFA
configuration window should be used to set second factors.
Existing values are only interesting to show in case it's one of the
legacy values 'x!<TYPE>' or a legacy secret e.g. synced from LDAP. In
the latter case it's kept editable like it previously was.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
www/manager6/dc/UserEdit.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/www/manager6/dc/UserEdit.js b/www/manager6/dc/UserEdit.js
index ad52edf0..ca701312 100644
--- a/www/manager6/dc/UserEdit.js
+++ b/www/manager6/dc/UserEdit.js
@@ -168,6 +168,12 @@ Ext.define('PVE.dc.UserEdit', {
data.keys === 'x!yubico') {
me.down('[name="keys"]').setDisabled(1);
}
+ if (data.keys === 'x') {
+ me.down('[name="keys"]').setHidden(true);
+ }
+ } else {
+ me.down('[name="keys"]').setDisabled(true);
+ me.down('[name="keys"]').setHidden(true);
}
},
});
--
2.39.2
More information about the pve-devel
mailing list