consul/ui/packages/consul-ui/app/controllers/_peered-resource.js

17 lines
440 B
JavaScript

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;
}
}
}