mirror of
https://github.com/documize/community.git
synced 2025-08-08 06:55:28 +02:00
auth edge case for profile
This commit is contained in:
parent
6cf236f8b3
commit
2de03ba049
2 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
session: Ember.inject.service(),
|
session: Ember.inject.service(),
|
||||||
|
|
||||||
beforeModel: function () {
|
beforeModel: function () {
|
||||||
if (!this.get("session").authenticated) {
|
if (!this.get("session.authenticated")) {
|
||||||
this.transitionTo('auth.login');
|
this.transitionTo('auth.login');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -24,4 +24,4 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
controller.set('model', model);
|
controller.set('model', model);
|
||||||
controller.set("folder", this.get('folderService.currentFolder'));
|
controller.set("folder", this.get('folderService.currentFolder'));
|
||||||
}
|
}
|
||||||
});
|
});
|
|
@ -45,7 +45,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
error(error, transition) { // jshint ignore: line
|
error(error /*, transition*/ ) {
|
||||||
if (error) {
|
if (error) {
|
||||||
if (netUtil.isAjaxAccessError(error)) {
|
if (netUtil.isAjaxAccessError(error)) {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
|
@ -56,5 +56,5 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
|
||||||
// Return true to bubble this event to any parent route.
|
// Return true to bubble this event to any parent route.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue