From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 3/3] ui: user edit: prohibit editing keys option
Date: Fri, 9 Feb 2024 14:08:21 +0100 [thread overview]
Message-ID: <20240209130821.51461-4-f.ebner@proxmox.com> (raw)
In-Reply-To: <20240209130821.51461-1-f.ebner@proxmox.com>
by turning the field into a displayfield. The TFA configuration
window should be used to set second factors. It's still worth showing
the field in case it's a legacy value.
Editing a secret that was originally synced from LDAP is a use case
where editing the field might've still made sense, but it's arguably
better to do that on the LDAP side then and re-sync.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
www/manager6/dc/UserEdit.js | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/www/manager6/dc/UserEdit.js b/www/manager6/dc/UserEdit.js
index ca701312..c9b32773 100644
--- a/www/manager6/dc/UserEdit.js
+++ b/www/manager6/dc/UserEdit.js
@@ -128,7 +128,7 @@ Ext.define('PVE.dc.UserEdit', {
],
advancedItems: [
{
- xtype: 'textfield',
+ xtype: 'displayfield',
name: 'keys',
fieldLabel: gettext('Key IDs'),
},
@@ -161,18 +161,7 @@ Ext.define('PVE.dc.UserEdit', {
success: function(response, options) {
var data = response.result.data;
me.setValues(data);
- if (data.keys) {
- if (data.keys === 'x' ||
- data.keys === 'x!oath' ||
- data.keys === 'x!u2f' ||
- 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);
+ if (!data.keys || data.keys === 'x') {
me.down('[name="keys"]').setHidden(true);
}
},
--
2.39.2
next prev parent reply other threads:[~2024-02-09 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 13:08 [pve-devel] [PATCH-SERIES manager] ui: user edit: improve 'keys' field Fiona Ebner
2024-02-09 13:08 ` [pve-devel] [PATCH manager 1/3] ui: user edit: protect user's TFA settings again Fiona Ebner
2024-04-23 14:52 ` [pve-devel] applied: " Thomas Lamprecht
2024-02-09 13:08 ` [pve-devel] [PATCH manager 2/3] ui: user edit: hide key field except for legacy values Fiona Ebner
2024-02-09 13:08 ` Fiona Ebner [this message]
2025-05-27 9:09 ` [pve-devel] [PATCH-SERIES manager] ui: user edit: improve 'keys' field Fiona Ebner
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=20240209130821.51461-4-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.