From b4454053e8a92b72a5a39c181e79fda19d3de9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Mon, 11 Mar 2024 15:06:00 +0000 Subject: [PATCH] fix: check for project in the action permissions check (#6503) Fixes the action permission check by also considering the project in the check. --- .../ProjectActionsFormStepActions/ProjectActionsActionItem.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectActions/ProjectActionsTable/ProjectActionsModal/ProjectActionsForm/ProjectActionsFormStep/ProjectActionsFormStepActions/ProjectActionsActionItem.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectActions/ProjectActionsTable/ProjectActionsModal/ProjectActionsForm/ProjectActionsFormStep/ProjectActionsFormStepActions/ProjectActionsActionItem.tsx index 3906be47f3..2c7adcbdbf 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectActions/ProjectActionsTable/ProjectActionsModal/ProjectActionsForm/ProjectActionsFormStep/ProjectActionsFormStepActions/ProjectActionsActionItem.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectActions/ProjectActionsTable/ProjectActionsModal/ProjectActionsForm/ProjectActionsFormStep/ProjectActionsFormStepActions/ProjectActionsActionItem.tsx @@ -72,8 +72,9 @@ export const ProjectActionsActionItem = ({ return requiredPermissions.some((requiredPermission) => permissions.some( - ({ permission, environment }) => + ({ permission, project, environment }) => permission === requiredPermission && + project === projectId && environment === actionEnvironment, ), );