mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-07 05:03:52 +00:00
followup: s/storedUser/storedAuth/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
63252ab6ab
commit
b6d1735ae1
@ -39,9 +39,9 @@ Ext.Ajax.on('beforerequest', function(conn, options) {
|
|||||||
}
|
}
|
||||||
options.headers.CSRFPreventionToken = Proxmox.CSRFPreventionToken;
|
options.headers.CSRFPreventionToken = Proxmox.CSRFPreventionToken;
|
||||||
}
|
}
|
||||||
let storedUser = Proxmox.Utils.getStoredUser();
|
let storedAuth = Proxmox.Utils.getStoredAuth();
|
||||||
if (storedUser.token) {
|
if (storedAuth.token) {
|
||||||
options.headers.Authorization = storedUser.token;
|
options.headers.Authorization = storedAuth.token;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ utilities: {
|
|||||||
if (Proxmox.LoggedOut) {
|
if (Proxmox.LoggedOut) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
let storedAuth = Proxmox.Utils.getStoredUser();
|
let storedAuth = Proxmox.Utils.getStoredAuth();
|
||||||
let cookie = Ext.util.Cookies.get(Proxmox.Setup.auth_cookie_name);
|
let cookie = Ext.util.Cookies.get(Proxmox.Setup.auth_cookie_name);
|
||||||
if ((Proxmox.UserName !== '' && cookie && !cookie.startsWith("PVE:tfa!")) || storedAuth.token) {
|
if ((Proxmox.UserName !== '' && cookie && !cookie.startsWith("PVE:tfa!")) || storedAuth.token) {
|
||||||
return cookie || storedAuth.token;
|
return cookie || storedAuth.token;
|
||||||
|
Loading…
Reference in New Issue
Block a user