open-vault/ui/app/routes/vault/cluster/access/leases/index.js

15 lines
348 B
JavaScript
Raw Normal View History

import Route from '@ember/routing/route';
2018-04-03 14:16:57 +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;
}
},
});