mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +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) {
|
||||
// (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 {
|
||||
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 } } : {}),
|
||||
type: SECRET_SHARED
|
||||
});
|
||||
}).populate("tags");
|
||||
}
|
||||
|
||||
const channel = getChannelFromUserAgent(req.headers['user-agent'])
|
||||
|
||||
Reference in New Issue
Block a user