mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
FIX: respect logout_redirect
setting on 'Log out all'
This commit is contained in:
parent
4bbf341ab1
commit
e4d743910d
@ -228,7 +228,17 @@ export default Ember.Controller.extend(
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
data: token ? { token_id: token.id } : {}
|
data: token ? { token_id: token.id } : {}
|
||||||
}
|
}
|
||||||
);
|
).then(() => {
|
||||||
|
if (!token) {
|
||||||
|
const redirect = this.siteSettings.logout_redirect;
|
||||||
|
if (Ember.isEmpty(redirect)) {
|
||||||
|
window.location.pathname = Discourse.getURL("/");
|
||||||
|
} else {
|
||||||
|
window.location.href = redirect;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(popupAjaxError);
|
||||||
},
|
},
|
||||||
|
|
||||||
showToken(token) {
|
showToken(token) {
|
||||||
|
Loading…
Reference in New Issue
Block a user