2018-09-25 16:28:26 +00:00
|
|
|
import Route from '@ember/routing/route';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Route.extend({
|
2018-04-03 14:16:57 +00:00
|
|
|
beforeModel(transition) {
|
|
|
|
if (
|
|
|
|
this.modelFor('vault.cluster.access.leases').get('canList') &&
|
|
|
|
transition.targetName === this.routeName
|
|
|
|
) {
|
|
|
|
return this.replaceWith('vault.cluster.access.leases.list-root');
|
|
|
|
} else {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|