2023-04-10 15:36:59 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
*/
|
|
|
|
|
2017-12-15 21:39:18 +00:00
|
|
|
import Mixin from '@ember/object/mixin';
|
2017-10-24 23:06:58 +00:00
|
|
|
|
2020-06-09 21:03:28 +00:00
|
|
|
// eslint-disable-next-line ember/no-new-mixins
|
2017-10-24 23:06:58 +00:00
|
|
|
export default Mixin.create({
|
|
|
|
setupController(controller) {
|
2019-03-26 07:46:44 +00:00
|
|
|
if (this.isForbidden) {
|
2017-10-24 23:06:58 +00:00
|
|
|
this.set('isForbidden', undefined);
|
|
|
|
controller.set('isForbidden', true);
|
|
|
|
}
|
|
|
|
this._super(...arguments);
|
|
|
|
},
|
|
|
|
|
|
|
|
resetController(controller) {
|
|
|
|
controller.set('isForbidden', false);
|
|
|
|
this._super(...arguments);
|
|
|
|
},
|
|
|
|
});
|