protected route
This commit is contained in:
parent
72c957f8dc
commit
eb1a8bb6e3
41 changed files with 56 additions and 43 deletions
11
app/pods/protected/species/edit/route.js
Normal file
11
app/pods/protected/species/edit/route.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import Ember from 'ember';
|
||||
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
|
||||
|
||||
export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||
afterModel: function(species) {
|
||||
if (!species.get('canEdit')) {
|
||||
this.transitionTo('species.show', species.get('id'));
|
||||
}
|
||||
},
|
||||
|
||||
});
|
Reference in a new issue