User permission error handling
This commit is contained in:
parent
9fc81bcc87
commit
40ac4b30af
2 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,8 @@ export default Route.extend({
|
||||||
if (!user.get('isAdmin')) {
|
if (!user.get('isAdmin')) {
|
||||||
this.transitionTo('protected.index');
|
this.transitionTo('protected.index');
|
||||||
}
|
}
|
||||||
|
}, () => {
|
||||||
|
this.transitionTo('protected.index');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ export default Route.extend({
|
||||||
if (!user.get('isAdmin') && user.get('id') !== user_id) {
|
if (!user.get('isAdmin') && user.get('id') !== user_id) {
|
||||||
this.transitionTo('protected.users.index');
|
this.transitionTo('protected.users.index');
|
||||||
}
|
}
|
||||||
|
}, () => {
|
||||||
|
this.transitionTo('protected.users.index');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Reference in a new issue