open-nomad/ui/app/mixins/with-forbidden-state.js
2017-10-24 16:40:27 -07:00

19 lines
393 B
JavaScript

import Ember from 'ember';
const { Mixin } = Ember;
export default Mixin.create({
setupController(controller) {
if (this.get('isForbidden')) {
this.set('isForbidden', undefined);
controller.set('isForbidden', true);
}
this._super(...arguments);
},
resetController(controller) {
controller.set('isForbidden', false);
this._super(...arguments);
},
});