mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-25 10:10:14 +00:00
ui: dc/AuthEditBase: only add tfa field on auth modes that support that
for now that are all, but we will ad one where that is not possible Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
3dd99bab1f
commit
550857eb16
@ -733,17 +733,20 @@ Ext.define('PVE.Utils', {
|
||||
ipanel: 'pveAuthADPanel',
|
||||
syncipanel: 'pveAuthLDAPSyncPanel',
|
||||
add: true,
|
||||
tfa: true,
|
||||
},
|
||||
ldap: {
|
||||
name: gettext('LDAP Server'),
|
||||
ipanel: 'pveAuthLDAPPanel',
|
||||
syncipanel: 'pveAuthLDAPSyncPanel',
|
||||
add: true,
|
||||
tfa: true,
|
||||
},
|
||||
pam: {
|
||||
name: 'Linux PAM',
|
||||
ipanel: 'pveAuthBasePanel',
|
||||
add: false,
|
||||
tfa: true,
|
||||
},
|
||||
pve: {
|
||||
name: 'Proxmox VE authentication server',
|
||||
|
@ -24,6 +24,8 @@ Ext.define('PVE.panel.AuthBase', {
|
||||
initComponent: function() {
|
||||
let me = this;
|
||||
|
||||
let options = PVE.Utils.authSchema[me.type];
|
||||
|
||||
if (!me.column1) { me.column1 = []; }
|
||||
if (!me.column2) { me.column2 = []; }
|
||||
if (!me.columnB) { me.columnB = []; }
|
||||
@ -45,11 +47,13 @@ Ext.define('PVE.panel.AuthBase', {
|
||||
uncheckedValue: 0,
|
||||
});
|
||||
|
||||
// last field of column2is tfa
|
||||
me.column2.push({
|
||||
xtype: 'pveTFASelector',
|
||||
deleteEmpty: !me.isCreate,
|
||||
});
|
||||
if (options.tfa) {
|
||||
// last field of column2is tfa
|
||||
me.column2.push({
|
||||
xtype: 'pveTFASelector',
|
||||
deleteEmpty: !me.isCreate,
|
||||
});
|
||||
}
|
||||
|
||||
me.columnB.push({
|
||||
xtype: 'textfield',
|
||||
|
Loading…
Reference in New Issue
Block a user