1
0
Fork 0
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:
Harvey Kandola 2016-07-07 11:54:34 -07:00
parent 6cf236f8b3
commit 2de03ba049
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
session: Ember.inject.service(),
beforeModel: function () {
if (!this.get("session").authenticated) {
if (!this.get("session.authenticated")) {
this.transitionTo('auth.login');
}
},
@ -24,4 +24,4 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
controller.set('model', model);
controller.set("folder", this.get('folderService.currentFolder'));
}
});
});

View file

@ -45,7 +45,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
return true;
},
error(error, transition) { // jshint ignore: line
error(error /*, transition*/ ) {
if (error) {
if (netUtil.isAjaxAccessError(error)) {
localStorage.clear();
@ -56,5 +56,5 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
// Return true to bubble this event to any parent route.
return true;
}
},
}
});