Update account service references
This commit is contained in:
parent
52979ac9e2
commit
bbcef5459e
18 changed files with 56 additions and 25 deletions
|
@ -1,9 +1,11 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
currentUser: Ember.inject.service('session-account'),
|
||||
|
||||
beforeModel: function(transition) {
|
||||
this._super(transition);
|
||||
this.get('session.currentUser').then((user) => {
|
||||
this.get('currentUser.account').then((user) => {
|
||||
if (!user.get('isAdmin')) {
|
||||
this.transitionTo('protected.index');
|
||||
}
|
||||
|
|
Reference in a new issue