* [COMPLIANCE] Add Copyright and License Headers * chore: 🤖 update Copyright headers to satisfy our lint rules --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
25 lines
595 B
JavaScript
25 lines
595 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Component from '@glimmer/component';
|
|
import { inject as service } from '@ember/service';
|
|
import { types } from 'api/models/credential';
|
|
|
|
export default class FormCredentialComponent extends Component {
|
|
// =services
|
|
@service features;
|
|
|
|
// =attributes
|
|
/**
|
|
* Returns an array of available credential types the user can create
|
|
* @type {object}
|
|
*/
|
|
get credentialTypes() {
|
|
return this.features.isEnabled('json-credentials')
|
|
? types
|
|
: types.filter((type) => type !== 'json');
|
|
}
|
|
}
|