[pve-devel] [PATCH manager] only use exact match in pveRealmSelector
Dominik Csapak
d.csapak at proxmox.com
Wed Jul 20 15:33:37 CEST 2016
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 at proxmox.com>
---
www/manager6/form/RealmComboBox.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/www/manager6/form/RealmComboBox.js b/www/manager6/form/RealmComboBox.js
index 8ce767c..4d9e5aa 100644
--- a/www/manager6/form/RealmComboBox.js
+++ b/www/manager6/form/RealmComboBox.js
@@ -26,7 +26,8 @@ Ext.define('PVE.form.RealmComboBox', {
needOTP: function(realm) {
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;
},
--
2.1.4
More information about the pve-devel
mailing list