mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 13:27:22 +00:00
fix: missing permision check
This commit is contained in:
@@ -853,7 +853,8 @@ export const registerDashboardRouter = async (server: FastifyZodProvider) => {
|
|||||||
200: z.object({
|
200: z.object({
|
||||||
secrets: secretRawSchema
|
secrets: secretRawSchema
|
||||||
.extend({
|
.extend({
|
||||||
secretPath: z.string().optional()
|
secretPath: z.string().optional(),
|
||||||
|
secretValueHidden: z.boolean()
|
||||||
})
|
})
|
||||||
.array()
|
.array()
|
||||||
.optional()
|
.optional()
|
||||||
|
|||||||
@@ -2672,6 +2672,15 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.map((secret) => {
|
.map((secret) => {
|
||||||
|
const secretValueHidden =
|
||||||
|
filterByAction === ProjectPermissionSecretActions.DescribeSecret &&
|
||||||
|
!hasSecretReadValueOrDescribePermission(permission, ProjectPermissionSecretActions.ReadValue, {
|
||||||
|
environment,
|
||||||
|
secretPath,
|
||||||
|
secretName: secret.key,
|
||||||
|
secretTags: secret.tags.map((i) => i.slug)
|
||||||
|
});
|
||||||
|
|
||||||
return reshapeBridgeSecret(
|
return reshapeBridgeSecret(
|
||||||
projectId,
|
projectId,
|
||||||
environment,
|
environment,
|
||||||
@@ -2685,7 +2694,7 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedComment }).toString()
|
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedComment }).toString()
|
||||||
: ""
|
: ""
|
||||||
},
|
},
|
||||||
false
|
secretValueHidden
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user