consul/ui/packages/consul-ui/app/controllers/_peered-resource.js
Ronald 9d21736e9f
Add UI copyright headers files (#16614)
* Add copyright headers to UI files

* Ensure copywrite file ignores external libs
2023-03-14 09:18:55 -04:00

22 lines
518 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class PeeredResourceController extends Controller {
@service abilities;
get _searchProperties() {
const { searchProperties } = this;
if (!this.abilities.can('use peers')) {
return searchProperties.filter((propertyName) => propertyName !== 'PeerName');
} else {
return searchProperties;
}
}
}