mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-19 21:51:09 +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
32 lines
1.3 KiB
JavaScript
32 lines
1.3 KiB
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Route from '@ember/routing/route';
|
|
import { inject as service } from '@ember/service';
|
|
import { hash } from 'rsvp';
|
|
|
|
export default class PkiRoute extends Route {
|
|
@service pathHelp;
|
|
@service secretMountPath;
|
|
|
|
beforeModel() {
|
|
// We call pathHelp for all the models in this engine that use OpenAPI before any model hooks
|
|
// so that the model attributes hydrate correctly. These only need to be called once to add
|
|
// the openAPI attributes to the model prototype
|
|
const mountPath = this.secretMountPath.currentPath;
|
|
return hash({
|
|
acme: this.pathHelp.getNewModel('pki/config/acme', mountPath),
|
|
certGenerate: this.pathHelp.getNewModel('pki/certificate/generate', mountPath),
|
|
certSign: this.pathHelp.getNewModel('pki/certificate/sign', mountPath),
|
|
cluster: this.pathHelp.getNewModel('pki/config/cluster', mountPath),
|
|
key: this.pathHelp.getNewModel('pki/key', mountPath),
|
|
role: this.pathHelp.getNewModel('pki/role', mountPath),
|
|
signCsr: this.pathHelp.getNewModel('pki/sign-intermediate', mountPath),
|
|
tidy: this.pathHelp.getNewModel('pki/tidy', mountPath),
|
|
urls: this.pathHelp.getNewModel('pki/config/urls', mountPath),
|
|
});
|
|
}
|
|
}
|