[PATCH conductor] BZ 798960 - tabAjaxRequests redirects to /login on HTTP 401

Matt Wagner matt.wagner at redhat.com
Fri Mar 2 21:28:43 UTC 2012


On Fri, Mar 02, 2012 at 03:08:55PM -0500, Matt Wagner wrote:
> 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

Disregard this for now, pending the outcome of my patch for #799516,
which would eliminate the need for this patch until a subsequent sprint.

-- Matt



More information about the aeolus-devel mailing list