roughing in custom session (again :( )

This commit is contained in:
Matthew Dillon 2015-07-09 20:52:01 -08:00
parent bb2386807c
commit 72c957f8dc
7 changed files with 42 additions and 10 deletions

View file

@ -2,7 +2,8 @@ import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export default Ember.Route.extend(AuthenticatedRouteMixin, {
beforeModel: function() {
beforeModel: function(transition) {
this._super(transition);
if (this.get('session.currentUser.role') === 'R') {
this.transitionTo('strains.index');
}