Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: handle undefined rules in policy editor
Scott Wilson230cf9b42ca8
diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/ProjectRoleModifySection.utils.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/ProjectRoleModifySection.utils.tsxindex 6313f521a8..0aad362a23 100644--- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/ProjectRoleModifySection.utils.tsx+++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/ProjectRoleModifySection.utils.tsx@@ -1956,7 +1956,7 @@ export const formRolePermission2API = (formVal: TFormSchema["permissions"]) => {// other than workspace everything else follows same// if in future there is a different follow the above on how workspace is doneObject.entries(formVal || {}).forEach(([subject, rules]) => {- rules.forEach((actions) => {+ (rules ?? []).forEach((actions) => {const caslActions = Object.keys(actions).filter((el) => actions?.[el as keyof typeof actions] && el !== "conditions" && el !== "inverted");