[PATCH conductor 0/1] #798259 - require_user handles XHR requests

Matt Wagner matt.wagner at redhat.com
Tue Feb 28 23:08:12 UTC 2012


Hi,

If you become logged-out while using Conductor and your next request is done over AJAX, the require_user method fails to find a template it can render and will display an error.

This adds a handler for the :js format, which will emit a 401 Unauthorized header. That, as I learned, will automatically (through Warden?) get you UserSessionsController#unauthenticated, which will display a warning message.

I started to try to customize this because I didn't love the wording that was shown, "Login failed: The Username and Password you entered do not match", which is a fairly odd thing to see if you're browsing along. However, the code is generic enough that we don't know that you *became* logged out, just that you are unauthenticated. We might want to make the message more generic, but I'm not keen on doing that as we have strings already translated.

-- Matt



More information about the aeolus-devel mailing list