open-vault/ui/app/routes/vault/cluster/logout.js

17 lines
454 B
JavaScript
Raw Normal View History

2018-04-03 14:16:57 +00:00
import Ember from 'ember';
import ModelBoundaryRoute from 'vault/mixins/model-boundary-route';
export default Ember.Route.extend(ModelBoundaryRoute, {
auth: Ember.inject.service(),
flashMessages: Ember.inject.service(),
modelTypes: ['secret', 'secret-engine'],
beforeModel() {
this.get('auth').deleteCurrentToken();
this.clearModelCache();
this.replaceWith('vault.cluster');
this.get('flashMessages').clearMessages();
},
});