summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-02-24 12:12:28 +0100
committerAleksander Machniak <alec@alec.pl>2012-02-24 12:12:28 +0100
commitd0b98e875358a700e2837f8517d2fb6a6f9b9508 (patch)
tree7c6c11330e7e562e2b7046c2f4e7fdc3455bbb46
parent4dbe52463e30dd28998c22ae0ed44cb1c7f21272 (diff)
downloadwebadmin-d0b98e875358a700e2837f8517d2fb6a6f9b9508.tar.gz
Logout on invalid-session (403) response from the API
-rw-r--r--public_html/js/kolab_admin.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index f2271ba..7e4839e 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -355,6 +355,11 @@ function kolab_admin()
if (!response || response.status != 'OK') {
var msg = response && response.reason ? response.reason : this.t('servererror');
this.display_message(msg, 'error');
+
+ // Logout on invalid-session error
+ if (response.code == 403)
+ this.main_logout();
+
return false;
}