followup: s/storedUser/storedAuth/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-06-30 13:27:29 +02:00
parent 63252ab6ab
commit b6d1735ae1

View File

@ -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;