Don't redirect to /login if authentication is required

We can just serve the login page in place.
This commit is contained in:
Eelco Dolstra
2013-07-09 12:02:15 +02:00
parent 13f0b54c49
commit 12ca755bea
3 changed files with 24 additions and 19 deletions

View File

@ -121,12 +121,11 @@
.fail(function() { bootbox.alert("Server request failed!"); });
},
onlogout: function() {
$.ajax({
type: 'POST',
url: '/logout',
success: function(res, status, xhr) { window.location.reload(); },
error: function(xhr, status, err) { alert("Logout failure: " + err); }
});
$.post("[% c.uri_for('/persona-logout') %]")
.done(function(data) {
window.location.reload();
})
.fail(function() { bootbox.alert("Server request failed!"); });
}
});