fix: window: AuthEditBase: rename variable 'realm' to 'type'

PVE/PMG API returns a variable called 'type' instead of 'realm'

Fixes: 3822a03 ("window: AuthEditBase: include more information in thrown errors")
Signed-off-by: Markus Frank <m.frank@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Markus Frank 2025-02-26 15:07:35 +01:00 committed by Thomas Lamprecht
parent 2df5c28d3f
commit ee9d92e37e

View File

@ -91,9 +91,9 @@ Ext.define('Proxmox.window.AuthEditBase', {
var data = response.result.data || {}; var data = response.result.data || {};
// just to be sure (should not happen) // just to be sure (should not happen)
// only check this when the type is not in the api path // only check this when the type is not in the api path
if (!me.useTypeInUrl && data.realm !== me.authType) { if (!me.useTypeInUrl && data.type !== me.authType) {
me.close(); me.close();
throw `got wrong auth type '${me.authType}' for realm '${data.realm}'`; throw `got wrong auth type '${me.authType}' for realm '${data.type}'`;
} }
me.setValues(data); me.setValues(data);
}, },