From b5c9b6a1bd9a13adcad33981a2e0a1ef8ad2a721 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Sun, 15 Sep 2024 12:36:42 -0700 Subject: [PATCH] fix: hide envs without read permission in secret main page nav header dropdown --- frontend/src/views/SecretMainPage/SecretMainPage.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/SecretMainPage/SecretMainPage.tsx b/frontend/src/views/SecretMainPage/SecretMainPage.tsx index c4ee5e4e5..14cd7b9b8 100644 --- a/frontend/src/views/SecretMainPage/SecretMainPage.tsx +++ b/frontend/src/views/SecretMainPage/SecretMainPage.tsx @@ -344,7 +344,15 @@ export const SecretMainPage = () => { + permission.can( + ProjectPermissionActions.Read, + subject(ProjectPermissionSub.Secrets, { + environment: slug, + secretPath + }) + ) + )} isFolderMode secretPath={secretPath} isProjectRelated