Skip to content

Commit 53d81a3

Browse files
committed
Update workflow notification to use Session ALS
1 parent b3246da commit 53d81a3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/components/project/workflow/handlers/project-workflow-notification.handler.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,15 @@ export class ProjectWorkflowNotificationHandler
7171
toStep: event.workflowEvent.to,
7272
});
7373

74-
const [changedBy, project, primaryPartnerName] = await Promise.all([
75-
this.users.readOneUnsecured(
76-
workflowEvent.who.id,
77-
this.config.rootUser.id,
78-
),
79-
this.projects.readOneUnsecured(event.project.id, this.config.rootUser.id),
80-
this.projects.getPrimaryOrganizationName(event.project.id),
81-
]);
74+
const [changedBy, project, primaryPartnerName] = await this.auth.asUser(
75+
this.config.rootUser.id,
76+
async (_) =>
77+
await Promise.all([
78+
this.users.readOneUnsecured(workflowEvent.who.id, _),
79+
this.projects.readOneUnsecured(event.project.id, _),
80+
this.projects.getPrimaryOrganizationName(event.project.id),
81+
]),
82+
);
8283

8384
await asyncPool(1, notifyees, async (notifier) => {
8485
if (!notifier.email) {

0 commit comments

Comments
 (0)