parent
0dbcd45c4e
commit
bcd2bbb4c4
10 changed files with 70 additions and 12 deletions
|
@ -5,8 +5,11 @@ export default Ember.Route.extend({
|
|||
this._super(transition);
|
||||
|
||||
let user_id = transition.params['protected.users.changepassword'].user_id;
|
||||
if (this.get('session.currentUser.id') !== user_id) {
|
||||
this.transitionTo('protected.users.index');
|
||||
}
|
||||
|
||||
this.get('session.currentUser').then((user) => {
|
||||
if (user.get('id') !== user_id) {
|
||||
this.transitionTo('protected.users.index');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Reference in a new issue