fix: get secret by ID using legacy permissions

This commit is contained in:
Daniel Hougaard
2025-03-08 04:04:52 +04:00
parent dc88115d43
commit 46ce46b5a0
2 changed files with 12 additions and 13 deletions

View File

@@ -368,14 +368,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
200: z.object({
secret: secretRawSchema.extend({
secretPath: z.string(),
tags: SecretTagsSchema.pick({
id: true,
slug: true,
color: true
})
.extend({ name: z.string() })
.array()
.optional(),
tags: SanitizedTagSchema.array().optional(),
secretMetadata: ResourceMetadataSchema.optional()
})
})

View File

@@ -1154,11 +1154,17 @@ export const secretV2BridgeServiceFactory = ({
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedComment }).toString()
: "";
return reshapeBridgeSecret(secret.projectId, folderWithPath.environmentSlug, folderWithPath.path, {
...secret,
value: secretValue,
comment: secretComment
});
return reshapeBridgeSecret(
secret.projectId,
folderWithPath.environmentSlug,
folderWithPath.path,
{
...secret,
value: secretValue,
comment: secretComment
},
false
);
};
const getSecretByName = async ({