]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
tfa login: hide u2f and yubico-otp if not available
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 29 Nov 2021 16:19:49 +0000 (17:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 29 Nov 2021 16:19:58 +0000 (17:19 +0100)
Else it may be to confusing for users to see TFA types they cannot
configure anymore (or never could, in the PBS/PMG case).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/window/TfaWindow.js

index 27d53f0fab19aaed9b371255bacdb9717064400c..22ac50dfefcefa6a8c74586bb6c85859615a214c 100644 (file)
@@ -400,6 +400,11 @@ Ext.define('Proxmox.window.TfaLoginWindow', {
                bind: {
                    disabled: '{!availableChallenge.u2f}',
                },
+               tabConfig: {
+                   bind: {
+                       hidden: '{!availableChallenge.u2f}',
+                   },
+               },
                items: [
                    {
                        xtype: 'box',
@@ -430,6 +435,11 @@ Ext.define('Proxmox.window.TfaLoginWindow', {
                bind: {
                    disabled: '{!availableChallenge.yubico}',
                },
+               tabConfig: {
+                   bind: {
+                       hidden: '{!availableChallenge.yubico}',
+                   },
+               },
                items: [
                    {
                        xtype: 'textfield',