open-nomad/ui/app/mixins/with-forbidden-state.js
2019-04-10 14:54:36 -07:00

17 lines
374 B
JavaScript

import Mixin from '@ember/object/mixin';
export default Mixin.create({
setupController(controller) {
if (this.isForbidden) {
this.set('isForbidden', undefined);
controller.set('isForbidden', true);
}
this._super(...arguments);
},
resetController(controller) {
controller.set('isForbidden', false);
this._super(...arguments);
},
});