Update account service references

This commit is contained in:
Matthew Ryan Dillon 2015-10-20 15:04:35 -07:00
parent 52979ac9e2
commit bbcef5459e
18 changed files with 56 additions and 25 deletions

View file

@ -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('isReader')) {
this.transitionTo('protected.characteristics.index');
}