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.

(cherry picked from commit 5df61d4)
  • Loading branch information
alvarolobato authored and olivergondza committed Dec 6, 2016
1 parent e66bfba commit dacbe03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion war/src/main/js/util/jenkins.js
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 dacbe03

Please sign in to comment.