open-vault/ui/app/routes/vault/cluster/access/leases/index.js
2018-04-03 09:16:57 -05:00

15 lines
339 B
JavaScript

import Ember from 'ember';
export default Ember.Route.extend({
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;
}
},
});