mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
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…
x
Reference in New Issue
Block a user