Skip to content

Commit

Permalink
[JENKINS-39741] - Redirect to login page after authorisation error wh…
Browse files Browse the repository at this point in the history
…en checking connectivity to update center and handle any other error.
  • Loading branch information
alvarolobato committed Nov 15, 2016
1 parent 21c1ee5 commit 5df61d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion war/src/main/js/util/jenkins.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,14 @@ exports.testConnectivity = function(siteId, handler) {
handler(true);
}
}
});
}, { error: function(xhr, textStatus, errorThrown) {
if (xhr.status === 403) {
exports.goTo('/login');
} else {
handler.call({ isError: true, errorMessage: errorThrown });
}
}
});
};
testConnectivity();
};
Expand Down

0 comments on commit 5df61d4

Please sign in to comment.