mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: addressed cert issuance restriction update
This commit is contained in:
@@ -276,4 +276,6 @@ export const SanitizedTagSchema = SecretTagsSchema.pick({
|
||||
|
||||
export const InternalCertificateAuthorityResponseSchema = CertificateAuthoritiesSchema.merge(
|
||||
InternalCertificateAuthoritiesSchema
|
||||
);
|
||||
).extend({
|
||||
requireTemplateForIssuance: z.boolean().optional()
|
||||
});
|
||||
|
||||
@@ -328,6 +328,7 @@ export const expandInternalCa = (
|
||||
}
|
||||
return {
|
||||
...ca.internalCa,
|
||||
...ca
|
||||
...ca,
|
||||
requireTemplateForIssuance: ca.disableDirectIssuance
|
||||
} as const;
|
||||
};
|
||||
|
||||
@@ -384,7 +384,7 @@ export const internalCertificateAuthorityServiceFactory = ({
|
||||
);
|
||||
|
||||
const updatedCa = await certificateAuthorityDAL.transaction(async (tx) => {
|
||||
if (status) {
|
||||
if (status !== undefined) {
|
||||
await internalCertificateAuthorityDAL.update(
|
||||
{
|
||||
certificateAuthorityId: ca.id
|
||||
@@ -394,7 +394,7 @@ export const internalCertificateAuthorityServiceFactory = ({
|
||||
);
|
||||
}
|
||||
|
||||
if (requireTemplateForIssuance) {
|
||||
if (requireTemplateForIssuance !== undefined) {
|
||||
await certificateAuthorityDAL.updateById(ca.id, { disableDirectIssuance: requireTemplateForIssuance }, tx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user