diff --git a/connect/connectNotificationServer.js b/connect/connectNotificationServer.js index 6d556d6..7fa03f9 100644 --- a/connect/connectNotificationServer.js +++ b/connect/connectNotificationServer.js @@ -321,6 +321,10 @@ const handler = (topic, message, logger, callback) => { )).then((notifications) => { allNotifications = _.filter(notifications, notification => notification.userId !== `${message.initiatorUserId}`); + if (eventConfig.includeUsers && message[eventConfig.includeUsers] && message[eventConfig.includeUsers].length>0){ + allNotifications = _.filter(allNotifications, notification => message[eventConfig.includeUsers].contains(notification.userId)); + } + // now let's retrieve some additional data // if message has userId such messages will likely need userHandle and user full name diff --git a/connect/events-config.js b/connect/events-config.js index 4c442bd..98b2cdb 100644 --- a/connect/events-config.js +++ b/connect/events-config.js @@ -149,6 +149,7 @@ const EVENTS = [ type: BUS_API_EVENT.CONNECT.PROJECT.FILE_UPLOADED, version: 2, projectRoles: [PROJECT_ROLE_OWNER, PROJECT_ROLE_COPILOT, PROJECT_ROLE_MANAGER, PROJECT_ROLE_MEMBER], + includeUsers: 'allowedUsers' }, { type: BUS_API_EVENT.CONNECT.PROJECT.SPECIFICATION_MODIFIED, version: 2, @@ -159,6 +160,7 @@ const EVENTS = [ }, { type: BUS_API_EVENT.CONNECT.PROJECT_PLAN.MODIFIED, projectRoles: [PROJECT_ROLE_OWNER, PROJECT_ROLE_COPILOT, PROJECT_ROLE_MANAGER, PROJECT_ROLE_MEMBER], + includeUsers: 'allowedUsers' }, { type: BUS_API_EVENT.CONNECT.PROJECT_PLAN.PROGRESS_UPDATED, projectRoles: [PROJECT_ROLE_OWNER, PROJECT_ROLE_COPILOT, PROJECT_ROLE_MANAGER, PROJECT_ROLE_MEMBER], @@ -198,6 +200,7 @@ const EVENTS = [ }, { type: BUS_API_EVENT.CONNECT.PROJECT_PLAN.TIMELINE_ADJUSTED, projectRoles: [PROJECT_ROLE_OWNER, PROJECT_ROLE_COPILOT, PROJECT_ROLE_MANAGER, PROJECT_ROLE_MEMBER], + includeUsers: 'allowedUsers' } ]; diff --git a/emails/src/partials/invites.html b/emails/src/partials/invites.html index 4d2e158..4cd14e2 100644 --- a/emails/src/partials/invites.html +++ b/emails/src/partials/invites.html @@ -66,4 +66,36 @@ + + + + + + + +
If you are enterprise client with SSO, please use the link below to sign in and join the project.
+ + + + + + + + + + +
+ + SSO Login + +
+ + + + + + +
+ + {{/if}} \ No newline at end of file