mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-17 20:17:00 +02:00
* fix cluster/config actually saving doh * add mkdown copy * add acme config to edit form * fix tests * add empty state capabilities test * add acceptance test for mixed permission save * swap order to match form * update copy * make markdown changes * fix y
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Model, { attr } from '@ember-data/model';
|
|
import { withFormFields } from 'vault/decorators/model-form-fields';
|
|
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
|
|
|
|
@withFormFields()
|
|
export default class PkiConfigUrlsModel extends Model {
|
|
// This model uses the backend value as the model ID
|
|
get useOpenAPI() {
|
|
return true;
|
|
}
|
|
getHelpUrl(backendPath) {
|
|
return `/v1/${backendPath}/config/urls?help=1`;
|
|
}
|
|
|
|
@attr({
|
|
label: 'Issuing certificates',
|
|
subText:
|
|
'The URL values for the Issuing Certificate field; these are different URLs for the same resource.',
|
|
showHelpText: false,
|
|
editType: 'stringArray',
|
|
})
|
|
issuingCertificates;
|
|
|
|
@attr({
|
|
label: 'CRL distribution points',
|
|
subText: 'Specifies the URL values for the CRL Distribution Points field.',
|
|
showHelpText: false,
|
|
editType: 'stringArray',
|
|
})
|
|
crlDistributionPoints;
|
|
|
|
@attr({
|
|
label: 'OSCP Servers',
|
|
subText: 'Specifies the URL values for the OCSP Servers field.',
|
|
showHelpText: false,
|
|
editType: 'stringArray',
|
|
})
|
|
ocspServers;
|
|
|
|
@lazyCapabilities(apiPath`${'id'}/config/urls`, 'id') urlsPath;
|
|
|
|
get canSet() {
|
|
return this.urlsPath.get('canUpdate') !== false;
|
|
}
|
|
}
|