mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
9d21736e9f
* Add copyright headers to UI files * Ensure copywrite file ignores external libs
26 lines
531 B
JavaScript
26 lines
531 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import BaseAbility from 'consul-ui/abilities/base';
|
|
import { inject as service } from '@ember/service';
|
|
|
|
export default class PeerAbility extends BaseAbility {
|
|
@service('env') env;
|
|
|
|
resource = 'peering';
|
|
segmented = false;
|
|
|
|
get isLinkable() {
|
|
return this.canDelete;
|
|
}
|
|
get canDelete() {
|
|
return !['DELETING'].includes(this.item.State) && super.canDelete;
|
|
}
|
|
|
|
get canUse() {
|
|
return this.env.var('CONSUL_PEERINGS_ENABLED');
|
|
}
|
|
}
|