2018-09-25 16:28:26 +00:00
|
|
|
import Route from '@ember/routing/route';
|
2018-04-03 14:16:57 +00:00
|
|
|
import UnloadModelRoute from 'vault/mixins/unload-model-route';
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Route.extend(UnloadModelRoute, {
|
2018-04-03 14:16:57 +00:00
|
|
|
beforeModel() {
|
|
|
|
let itemType = this.modelFor('vault.cluster.access.identity');
|
|
|
|
if (itemType !== 'entity') {
|
|
|
|
return this.transitionTo('vault.cluster.access.identity');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
model() {
|
|
|
|
let modelType = `identity/entity-merge`;
|
|
|
|
return this.store.createRecord(modelType);
|
|
|
|
},
|
|
|
|
});
|