ui: show login window if we get a 401 auth exception

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-12-17 14:45:13 +01:00
parent a602faeb98
commit 8af272fd14

View File

@ -101,6 +101,14 @@ Ext.define('PBS.MainView', {
me.lookupReference('usernameinfo').update({username:Proxmox.UserName});
// show login on requestexception
// fixme: what about other errors
Ext.Ajax.on('requestexception', function(conn, response, options) {
if (response.status == 401) { // auth failure
me.logout();
}
});
// get ticket periodically
Ext.TaskManager.start({
run: function() {