fix auto logout if auth error

This commit is contained in:
Yuri Kuznetsov
2014-06-11 16:57:10 +03:00
parent c09c4b2035
commit 0458544bbb
3 changed files with 7 additions and 5 deletions
+3 -1
View File
@@ -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:
+3 -3
View File
@@ -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);
},*/
});
},
+1 -1
View File
@@ -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 {