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: findall group projects returning root projects
IgorHorta40bb6ca5fb8f
diff --git a/backend/src/ee/services/group/group-dal.ts b/backend/src/ee/services/group/group-dal.tsindex b76688928c..353ff85836 100644--- a/backend/src/ee/services/group/group-dal.ts+++ b/backend/src/ee/services/group/group-dal.ts@@ -472,18 +472,9 @@ export const groupDALFactory = (db: TDbClient) => {orderDirection?: OrderByDirection;}) => {try {- // Include projects in the group's org and in any child sub-orgs (so root-org groups show inherited sub-org projects)- const projectOrgIdsSubquery = db- .replicaNode()(TableName.Organization)- .where(`${TableName.Organization}.rootOrgId`, orgId)- .select(db.ref("id").withSchema(TableName.Organization));const query = db.replicaNode()(TableName.Project)- .andWhere((qb) => {- void qb- .where(`${TableName.Project}.orgId`, orgId)- .orWhereIn(`${TableName.Project}.orgId`, projectOrgIdsSubquery);- })+ .where(`${TableName.Project}.orgId`, orgId).leftJoin(TableName.Membership, (bd) => {bd.on(`${TableName.Project}.id`, "=", `${TableName.Membership}.scopeProjectId`).andOn(`${TableName.Membership}.actorGroupId`, "=", db.raw("?", [groupId]))