mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 12:27:31 +00:00
add back .populate(tags) to secrets GET via service token
This commit is contained in:
@@ -608,7 +608,7 @@ export const getSecrets = async (req: Request, res: Response) => {
|
|||||||
|
|
||||||
if (hasWriteOnlyAccess) {
|
if (hasWriteOnlyAccess) {
|
||||||
// (i.e. you don't get values to decrypt since you can only write)
|
// (i.e. you don't get values to decrypt since you can only write)
|
||||||
secrets = await Secret.find(secretQuery).select("secretKeyCiphertext secretKeyIV secretKeyTag")
|
secrets = await Secret.find(secretQuery).select("secretKeyCiphertext secretKeyIV secretKeyTag").populate("tags")
|
||||||
} else {
|
} else {
|
||||||
secrets = await Secret.find(secretQuery).populate("tags")
|
secrets = await Secret.find(secretQuery).populate("tags")
|
||||||
}
|
}
|
||||||
@@ -625,7 +625,7 @@ export const getSecrets = async (req: Request, res: Response) => {
|
|||||||
},
|
},
|
||||||
...(tagIds.length > 0 ? { tags: { $in: tagIds } } : {}),
|
...(tagIds.length > 0 ? { tags: { $in: tagIds } } : {}),
|
||||||
type: SECRET_SHARED
|
type: SECRET_SHARED
|
||||||
});
|
}).populate("tags");
|
||||||
}
|
}
|
||||||
|
|
||||||
const channel = getChannelFromUserAgent(req.headers['user-agent'])
|
const channel = getChannelFromUserAgent(req.headers['user-agent'])
|
||||||
|
|||||||
Reference in New Issue
Block a user