]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: user edit: protect user's TFA settings again
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 9 Feb 2024 13:08:19 +0000 (14:08 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Apr 2024 14:51:32 +0000 (16:51 +0200)
Same rationale as in 5b25580d ("Protect the user's tfa key setting."):
it should not be possible to change the value when it's not an actual
secret but a reference to what TFA method is used or, in case of 'x',
whether TFA is used.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
www/manager6/dc/UserEdit.js

index b637cd537c5a02dbcf5222a73d02e258eb47bc4b..ad52edf0058e9287f5f54265f026da0e1b180562 100644 (file)
@@ -162,7 +162,10 @@ Ext.define('PVE.dc.UserEdit', {
                    var data = response.result.data;
                    me.setValues(data);
                    if (data.keys) {
-                       if (data.keys === 'x!oath' || data.keys === 'x!u2f') {
+                       if (data.keys === 'x' ||
+                           data.keys === 'x!oath' ||
+                           data.keys === 'x!u2f' ||
+                           data.keys === 'x!yubico') {
                            me.down('[name="keys"]').setDisabled(1);
                        }
                    }