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: identity org check
Piyush Gupta5d2a34c93279
diff --git a/backend/src/ee/services/group/group-service.ts b/backend/src/ee/services/group/group-service.tsindex dac1796cb2..36ec57a637 100644--- a/backend/src/ee/services/group/group-service.ts+++ b/backend/src/ee/services/group/group-service.ts@@ -574,13 +574,10 @@ export const groupServiceFactory = ({details: { missingPermissions: permissionBoundary.missingPermissions }});- const identity = await identityDAL.findOne({- orgId: actorOrgId,- id: identityId- });+ const [identity] = await identityOrgMembershipDAL.findByIds([identityId]);if (!identity) {- throw new NotFoundError({ message: `Failed to find identity with ID ${identityId}` });+ throw new NotFoundError({ message: `Identity with id ${identityId} is not part of the organization` });}const identities = await addIdentitiesToGroup({@@ -729,15 +726,10 @@ export const groupServiceFactory = ({details: { missingPermissions: permissionBoundary.missingPermissions }});- const identity = await identityDAL.findOne({- orgId: actorOrgId,- id: identityId- });+ const [identity] = await identityOrgMembershipDAL.findByIds([identityId]);if (!identity)- throw new NotFoundError({- message: `Failed to find identity with ID ${identityId}`- });+ throw new NotFoundError({ message: `Identity with id ${identityId} is not part of the organization` });const identities = await removeIdentitiesFromGroup({group,