diff --git a/app/pods/protected/users/index/route.js b/app/pods/protected/users/index/route.js index 2752983..d2c99e2 100644 --- a/app/pods/protected/users/index/route.js +++ b/app/pods/protected/users/index/route.js @@ -11,6 +11,8 @@ export default Route.extend({ if (!user.get('isAdmin')) { this.transitionTo('protected.index'); } + }, () => { + this.transitionTo('protected.index'); }); }, diff --git a/app/pods/protected/users/show/route.js b/app/pods/protected/users/show/route.js index 798787d..fe3c12c 100644 --- a/app/pods/protected/users/show/route.js +++ b/app/pods/protected/users/show/route.js @@ -15,6 +15,8 @@ export default Route.extend({ if (!user.get('isAdmin') && user.get('id') !== user_id) { this.transitionTo('protected.users.index'); } + }, () => { + this.transitionTo('protected.users.index'); }); },