fix #6311: ui: prevent consent text from showing twice for oidc

Signed-off-by: Thomas Skinner <thomas@atskinner.net>
Tested-by: Gabriel Goller <g.goller@proxmox.com>
Link: https://lore.proxmox.com/20250414021836.1469242-2-thomas@atskinner.net
This commit is contained in:
Thomas Skinner 2025-04-13 21:18:36 -05:00 committed by Thomas Lamprecht
parent 2a5fa54a85
commit 1d3ff80fe5

View File

@ -22,12 +22,15 @@ Ext.define('PVE.window.LoginWindow', {
init: async function() {
if (Proxmox.ConsentText) {
Ext.create("Proxmox.window.ConsentModal", {
autoShow: true,
consent: Proxmox.Markdown.parse(
Proxmox.Utils.base64ToUtf8(Proxmox.ConsentText),
),
});
let oidc_auth_redirect = Proxmox.Utils.getOpenIDRedirectionAuthorization();
if (oidc_auth_redirect === undefined) {
Ext.create("Proxmox.window.ConsentModal", {
autoShow: true,
consent: Proxmox.Markdown.parse(
Proxmox.Utils.base64ToUtf8(Proxmox.ConsentText),
),
});
}
}
},