public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/3] ui: user edit: hide key field except for legacy values
Date: Fri,  9 Feb 2024 14:08:20 +0100	[thread overview]
Message-ID: <20240209130821.51461-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20240209130821.51461-1-f.ebner@proxmox.com>

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@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





  parent reply	other threads:[~2024-02-09 13:08 UTC|newest]

Thread overview: 5+ 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 ` Fiona Ebner [this message]
2024-02-09 13:08 ` [pve-devel] [PATCH manager 3/3] ui: user edit: prohibit editing keys option 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-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal