2021-02-19 16:42:16 +00:00
|
|
|
import BaseAbility from './base';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
|
|
|
|
export default class NspaceAbility extends BaseAbility {
|
|
|
|
@service('env') env;
|
|
|
|
|
|
|
|
resource = 'operator';
|
|
|
|
segmented = false;
|
|
|
|
|
|
|
|
get canManage() {
|
|
|
|
return this.canCreate;
|
|
|
|
}
|
|
|
|
|
2021-03-11 09:29:11 +00:00
|
|
|
get canDelete() {
|
|
|
|
return this.item.Name !== 'default' && super.canDelete;
|
|
|
|
}
|
|
|
|
|
2021-02-19 16:42:16 +00:00
|
|
|
get canChoose() {
|
2021-09-15 18:50:11 +00:00
|
|
|
return this.canUse;
|
2021-05-26 16:43:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
get canUse() {
|
|
|
|
return this.env.var('CONSUL_NSPACES_ENABLED');
|
2021-02-19 16:42:16 +00:00
|
|
|
}
|
|
|
|
}
|