[PATCH conductor] BZ 798960 - tabAjaxRequests redirects to /login on HTTP 401
Matt Wagner
matt.wagner at redhat.com
Fri Mar 2 20:08:55 UTC 2012
This works around a bug introduced when we added expiring sessions,
in that AJAX requests for partial content didn't do anything helpful
when they encountered a 401 request.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=798960
---
src/public/javascripts/application.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
index 7f6f624..ca79776 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -25,7 +25,12 @@ $.extend(Conductor, {
$('#tab').html(data).show();
})
.error(function(data) {
- $('#tab').html(data.responseText).show();
+ // If our session has timed out, redirect to the login page:
+ if(data.status == 401)) {
+ window.location = Conductor.PATH_PREFIX + "login";
+ } else {
+ $('#tab').html(data.responseText).show();
+ }
});
Conductor.tabRemoveActiveClass();
--
1.7.7.6
More information about the aeolus-devel
mailing list