aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/libs
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-09-13 17:57:52 +0200
committerStas Vilchik <vilchiks@gmail.com>2016-09-13 17:58:15 +0200
commitb48a6cd51868eab19a131ef7d43ec8d0e10c90f6 (patch)
tree84c0f36b280e4bb6bcbb447bba1140cc9c157421 /server/sonar-web/src/main/js/libs
parent9033014604e9d537068485b0c71c685eac34d721 (diff)
parent0359411125578632c70ccf458625d0163c2b8b16 (diff)
downloadsonarqube-b48a6cd51868eab19a131ef7d43ec8d0e10c90f6.tar.gz
sonarqube-b48a6cd51868eab19a131ef7d43ec8d0e10c90f6.zip
Merge branch 'branch-5.6'
Diffstat (limited to 'server/sonar-web/src/main/js/libs')
-rw-r--r--server/sonar-web/src/main/js/libs/sonar.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/libs/sonar.js b/server/sonar-web/src/main/js/libs/sonar.js
index 023708bfb7b..366925e71fd 100644
--- a/server/sonar-web/src/main/js/libs/sonar.js
+++ b/server/sonar-web/src/main/js/libs/sonar.js
@@ -37,6 +37,12 @@ jQuery(function () {
jQuery.ajaxSetup({
beforeSend: function (jqXHR) {
jqXHR.setRequestHeader(request.getCSRFTokenName(), request.getCSRFTokenValue());
+ },
+ statusCode: {
+ 401: function () {
+ window.location = window.baseUrl + '/sessions/new?return_to=' +
+ encodeURIComponent(window.location.pathname + window.location.search + window.location.hash);
+ }
}
});