[pve-devel] [PATCH manager] only use exact match in pveRealmSelector
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Aug 17 13:33:31 CEST 2016
applied
On Wed, Jul 20, 2016 at 03:33:37PM +0200, Dominik Csapak wrote:
> 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
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list