1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 13:49:42 +02:00

Remove double screen blink after logout

This commit is contained in:
McMatts 2019-05-14 14:52:36 +01:00
parent 8ecbb9cdee
commit e2a3962092
4 changed files with 6 additions and 4 deletions

View file

@ -15,6 +15,8 @@ import Route from '@ember/routing/route';
export default Route.extend({
session: service(),
appMeta: service(),
router: service(),
localStorage: service(),
activate: function () {
this.get('session').invalidate().then(() => {

View file

@ -25,7 +25,7 @@ export default Route.extend(ApplicationRouteMixin, {
let sa = this.get('session.session.authenticator');
return this.get('appMeta').boot(transition.targetName, window.location.href).then(data => {
return this.get('appMeta').boot(transition.targetName, '').then(data => {
if (sa !== "authenticator:documize" && sa !== "authenticator:keycloak" && sa !== "authenticator:ldap" && data.allowAnonymousAccess) {
if (!this.get('appMeta.setupMode') && !this.get('appMeta.secureMode')) {
return this.get('session').authenticate('authenticator:anonymous', data);
@ -46,7 +46,7 @@ export default Route.extend(ApplicationRouteMixin, {
this.get('localStorage').clearSessionItem('entryUrl')
if (!_.includes(next, '/auth/')) {
window.location.href= next;
// window.location.href= next;
}
}
},

View file

@ -89,7 +89,7 @@ export default Service.extend({
this.get('localStorage').clearAll();
return resolve(this);
} else if (!_.includes(requestedUrl, '/auth/')) {
} else if (!_.includes(requestedUrl, '/auth/') && !_.isEmpty(requestedUrl)) {
this.get('localStorage').storeSessionItem('entryUrl', requestedUrl);
}

View file

@ -99,7 +99,7 @@
<a href="https://docs.documize.com" target="_blank" class="item">Help</a>
{{#if enableLogout}}
<div class="divider"></div>
{{#link-to "auth.logout" class="item" }}Logout{{/link-to}}
{{#link-to "auth.logout" class="item"}}Logout{{/link-to}}
{{/if}}
</div>
{{/attach-popover}}