FIX: logout not working
This commit is contained in:
parent
83fda03495
commit
280ca372a3
|
@ -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(' - '));
|
||||
|
|
Loading…
Reference in New Issue