[pmg-devel] [PATCH widget-toolkit v4 8/10] fix: window: AuthEditBase: rename variable 'realm' to 'type'

Markus Frank m.frank at proxmox.com
Tue Jan 14 10:30:08 CET 2025


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

Fixes: 3822a031ddbe4136aa847476f2e3785934a41547
Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
 src/window/AuthEditBase.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/window/AuthEditBase.js b/src/window/AuthEditBase.js
index 73c1fee..e044235 100644
--- a/src/window/AuthEditBase.js
+++ b/src/window/AuthEditBase.js
@@ -91,9 +91,9 @@ Ext.define('Proxmox.window.AuthEditBase', {
 		    var data = response.result.data || {};
 		    // just to be sure (should not happen)
 		    // 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();
-			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);
 		},
-- 
2.39.5





More information about the pmg-devel mailing list