fix auto logout if auth error
This commit is contained in:
@@ -431,7 +431,9 @@ _.extend(Espo.App.prototype, {
|
||||
case 401:
|
||||
if (!options.login) {
|
||||
Espo.Ui.error(self.language.translate('Auth error'));
|
||||
self.logout();
|
||||
if (self.auth) {
|
||||
self.logout();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 403:
|
||||
|
||||
@@ -80,9 +80,9 @@ _.extend(Espo.LayoutManager.prototype, {
|
||||
this.cache.set('app-layout', key, layout);
|
||||
}
|
||||
}.bind(this),
|
||||
error: function () {
|
||||
throw new Error('Could not load layout ' + controller + '#' + type);
|
||||
},
|
||||
/*error: function () {
|
||||
console.error('Could not load layout ' + controller + '#' + type);
|
||||
},*/
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ Espo.define('Views.Site.Navbar', 'View', function (Dep) {
|
||||
},
|
||||
|
||||
setup: function () {
|
||||
this.getRouter().on('routed', function (e) {
|
||||
this.getRouter().on('routed', function (e) {
|
||||
if (e.controller) {
|
||||
this.selectTab(e.controller);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user