mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 00:30:56 +00:00
feat: greepy review
This commit is contained in:
@@ -92,10 +92,15 @@ export const newOrgMembershipUserFactory = ({
|
||||
},
|
||||
scopeOrgId: org.rootOrgId
|
||||
});
|
||||
if (rootOrgMembership.length !== newMembers.length)
|
||||
if (rootOrgMembership.length !== newMembers.length) {
|
||||
const emails = newMembers
|
||||
.filter((user) => !rootOrgMembership.find((i) => i.actorUserId === user.id))
|
||||
.map((el) => el.email)
|
||||
.join(",");
|
||||
throw new BadRequestError({
|
||||
message: "User doesn't have membership in root organization"
|
||||
message: `Users with email ${emails} doesn't have membership in root organization`
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user