only use exact match in pveRealmSelector

store.findRecord returns the first match, and by default
matches the beginning of the strings not the whole

without this, with multple realms with the same name, but different
tfa settings, the login window can show the tfa input box even
when the selected realm has no tfa active

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-07-20 15:33:37 +02:00 committed by Fabian Grünbichler
parent ab39d66e9e
commit c68c743659

View File

@ -26,7 +26,8 @@ Ext.define('PVE.form.RealmComboBox', {
needOTP: function(realm) { needOTP: function(realm) {
var me = this; var me = this;
var rec = me.store.findRecord('realm', realm); // use exact match
var rec = me.store.findRecord('realm', realm, 0, false, false, true);
return rec && rec.data && rec.data.tfa ? rec.data.tfa : undefined; return rec && rec.data && rec.data.tfa ? rec.data.tfa : undefined;
}, },