mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 09:26:47 +00:00
misc: add missing version filter
This commit is contained in:
@@ -1252,21 +1252,24 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
: secretVersionDAL
|
: secretVersionDAL
|
||||||
.findOne({
|
.findOne({
|
||||||
folderId,
|
folderId,
|
||||||
|
version,
|
||||||
type: secretType,
|
type: secretType,
|
||||||
userId: secretType === SecretType.Personal ? actorId : null,
|
userId: secretType === SecretType.Personal ? actorId : null,
|
||||||
key: secretName
|
key: secretName
|
||||||
})
|
})
|
||||||
.then((el) =>
|
.then((el) =>
|
||||||
SecretsV2Schema.extend({
|
el
|
||||||
tags: z
|
? SecretsV2Schema.extend({
|
||||||
.object({ slug: z.string(), name: z.string(), id: z.string(), color: z.string() })
|
tags: z
|
||||||
.array()
|
.object({ slug: z.string(), name: z.string(), id: z.string(), color: z.string() })
|
||||||
.default([])
|
.array()
|
||||||
.optional()
|
.default([])
|
||||||
}).parse({
|
.optional()
|
||||||
...el,
|
}).parse({
|
||||||
id: el.secretId
|
...el,
|
||||||
})
|
id: el.secretId
|
||||||
|
})
|
||||||
|
: undefined
|
||||||
));
|
));
|
||||||
|
|
||||||
throwIfMissingSecretReadValueOrDescribePermission(permission, ProjectPermissionSecretActions.DescribeSecret, {
|
throwIfMissingSecretReadValueOrDescribePermission(permission, ProjectPermissionSecretActions.DescribeSecret, {
|
||||||
|
|||||||
@@ -1558,6 +1558,7 @@ export const secretServiceFactory = ({
|
|||||||
actorOrgId,
|
actorOrgId,
|
||||||
actor,
|
actor,
|
||||||
actorId,
|
actorId,
|
||||||
|
version,
|
||||||
expandSecretReferences,
|
expandSecretReferences,
|
||||||
type,
|
type,
|
||||||
secretName
|
secretName
|
||||||
|
|||||||
Reference in New Issue
Block a user