parent
d353dc6e75
commit
4a54813440
6 changed files with 90 additions and 9 deletions
app/pods/protected/users/changepassword
12
app/pods/protected/users/changepassword/route.js
Normal file
12
app/pods/protected/users/changepassword/route.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
beforeModel: function(transition) {
|
||||
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');
|
||||
}
|
||||
}
|
||||
});
|
Reference in a new issue