mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 21:28:18 +00:00
fix: check for recipients to send project access email
This commit is contained in:
@@ -198,15 +198,17 @@ export const orgAdminServiceFactory = ({
|
|||||||
)
|
)
|
||||||
.map((el) => el.user.email!);
|
.map((el) => el.user.email!);
|
||||||
|
|
||||||
await smtpService.sendMail({
|
if (filteredProjectMembers.length) {
|
||||||
template: SmtpTemplates.OrgAdminProjectDirectAccess,
|
await smtpService.sendMail({
|
||||||
recipients: filteredProjectMembers,
|
template: SmtpTemplates.OrgAdminProjectDirectAccess,
|
||||||
subjectLine: "Organization Admin Project Direct Access Issued",
|
recipients: filteredProjectMembers,
|
||||||
substitutions: {
|
subjectLine: "Organization Admin Project Direct Access Issued",
|
||||||
projectName: project.name,
|
substitutions: {
|
||||||
email: projectMembers.find((el) => el.userId === actorId)?.user?.username
|
projectName: project.name,
|
||||||
}
|
email: projectMembers.find((el) => el.userId === actorId)?.user?.username
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
return { isExistingMember: false, membership: updatedMembership };
|
return { isExistingMember: false, membership: updatedMembership };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user