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:
parent
a602faeb98
commit
8af272fd14
@ -101,6 +101,14 @@ Ext.define('PBS.MainView', {
|
|||||||
|
|
||||||
me.lookupReference('usernameinfo').update({username:Proxmox.UserName});
|
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
|
// get ticket periodically
|
||||||
Ext.TaskManager.start({
|
Ext.TaskManager.start({
|
||||||
run: function() {
|
run: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user