mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
set defaults for request context
This commit is contained in:
parent
63b24aed3f
commit
8081b60146
23 changed files with 692 additions and 666 deletions
|
@ -33,6 +33,8 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
|||
if (sa !== "authenticator:documize" && sa !== "authenticator:keycloak" && data.allowAnonymousAccess) {
|
||||
if (!this.get('appMeta.setupMode')) {
|
||||
return this.get('session').authenticate('authenticator:anonymous', data);
|
||||
// } else {
|
||||
// this.get('localStorage').clearAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,6 +44,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
|||
|
||||
sessionAuthenticated() {
|
||||
if (this.get('appMeta.setupMode')) {
|
||||
this.get('localStorage').clearAll();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -68,7 +71,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
|||
console.log(transition); // eslint-disable-line no-console
|
||||
|
||||
if (netUtil.isAjaxAccessError(error) && !this.get('appMeta.setupMode')) {
|
||||
localStorage.clear();
|
||||
localStorage.clearAll();
|
||||
return this.transitionTo('auth.login');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue