mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 16:47:46 +00:00
Protect the user's tfa key setting.
If oath or U2F is set, it should not be possible to change it in the GUI on the user edit window. It disables the second factor, but leave the tfa key behind in the file tfa.cfg. The key in the tfa.cfg file is a problem when the user tries to recreate a key. The old key must be deleted before a new one can be created.
This commit is contained in:
parent
aa85713036
commit
5b25580d88
@ -198,6 +198,11 @@ Ext.define('PVE.dc.UserEdit', {
|
||||
}
|
||||
}
|
||||
me.setValues(data);
|
||||
if (data.keys) {
|
||||
if ( data.keys === 'x!oath' || data.keys === 'x!u2f' ) {
|
||||
me.down('[name="keys"]').setDisabled(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user