FIX: logout not working

This commit is contained in:
Sam 2016-03-02 11:18:32 +11:00
parent 83fda03495
commit 280ca372a3
1 changed files with 6 additions and 6 deletions

View File

@ -17,16 +17,16 @@ function unlessReadOnly(method, message) {
const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
siteTitle: setting('title'),
_handleLogout() {
if (this.currentUser) {
this.currentUser.destroySession().then(() => logout(this.siteSettings, this.keyValueStore));
}
},
actions: {
logout: unlessReadOnly('_handleLogout', I18n.t("read_only_mode.logout_disabled")),
_handleLogout() {
if (this.currentUser) {
this.currentUser.destroySession().then(() => logout(this.siteSettings, this.keyValueStore));
}
},
_collectTitleTokens(tokens) {
tokens.push(this.get('siteTitle'));
Discourse.set('_docTitle', tokens.join(' - '));