mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: logout not working
This commit is contained in:
parent
83fda03495
commit
280ca372a3
1 changed files with 6 additions and 6 deletions
|
@ -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 a new issue