Skip to content

Commit 05052b5

Browse files
authored
Merge pull request #141 from topcoder-platform/dev
Supporting release for Connect 2.4.13
2 parents 0300c26 + d56542c commit 05052b5

File tree

4 files changed

+78
-59
lines changed

4 files changed

+78
-59
lines changed

connect/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ module.exports = {
3535
DEFAULT_REPLY_EMAIL: process.env.DEFAULT_REPLY_EMAIL,
3636

3737
CONNECT_URL: process.env.CONNECT_URL || 'https://connect.topcoder-dev.com',
38+
ACCOUNTS_APP_URL: process.env.ACCOUNTS_APP_URL || "https://accounts.topcoder-dev.com",
3839
};

connect/notificationServices/email.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function handleScheduledEvents(events, setEventsStatus) {
9898
const bundleData = {
9999
subject: 'Your Topcoder project updates',
100100
connectURL: config.CONNECT_URL,
101+
accountsAppURL: config.ACCOUNTS_APP_URL,
101102
projects: _.chain(userEvents)
102103
.groupBy('data.data.projectId')
103104
.mapValues(projectUserEvents => ({
@@ -165,6 +166,7 @@ function wrapIndividualNotification(data) {
165166
return {
166167
subject,
167168
connectURL: config.CONNECT_URL,
169+
accountsAppURL: config.ACCOUNTS_APP_URL,
168170
projects: [{
169171
id: data.data.data.projectId,
170172
name: data.data.data.projectName,

emails/src/partials/invites.html

Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -24,73 +24,79 @@
2424
</td>
2525
</tr>
2626

27+
{{#if [isSSO]}}
2728

28-
<tr class="post-details">
29-
<td class="main-td">
30-
<table class="main-child">
29+
<tr class="post-details">
30+
<td class="main-td">
31+
<table class="main-child">
32+
<tr>
33+
<td class="empty-child-one"></td>
34+
<td>You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. Please use the link below to sign in and join the project.</td>
35+
</tr>
36+
</table>
37+
</td>
38+
</tr>
39+
40+
<tr class="empty-50">
41+
<td class="main-td">
42+
<table class="main-child">
43+
<tr><td></td></tr>
44+
</table>
45+
</td>
46+
</tr>
47+
48+
<tr class="button-row button-one">
49+
<td class="main-td">
50+
<table class="main-child">
3151
<tr>
3252
<td class="empty-child-one"></td>
33-
<td>You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. To join, please register with Topcoder.</td>
53+
<td class="second-child" align="center">
54+
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{projectId}}">
55+
SSO Login
56+
</a>
57+
</td>
58+
<td class="empty-child-one"></td>
3459
</tr>
35-
</table>
36-
</td>
37-
</tr>
38-
60+
</table>
61+
</td>
62+
</tr>
63+
64+
{{else}}
65+
<tr class="post-details">
66+
<td class="main-td">
67+
<table class="main-child">
68+
<tr>
69+
<td class="empty-child-one"></td>
70+
<td>You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. To join, please register with Topcoder.</td>
71+
</tr>
72+
</table>
73+
</td>
74+
</tr>
3975

40-
<tr class="empty-50">
41-
<td class="main-td">
42-
<table class="main-child">
43-
<tr><td></td></tr>
44-
</table>
45-
</td>
46-
</tr>
47-
<tr class="button-row button-one">
48-
<td class="main-td">
49-
<table class="main-child">
50-
<tr>
51-
<td class="empty-child-one"></td>
52-
<td class="second-child" align="center">
53-
<a href="{{@root.accountsAppURL}}/connect/registration?retUrl={{@root.connectURL}}/projects/{{projectId}}">
54-
Register
55-
</a>
56-
</td>
57-
<td class="empty-child-one"></td>
58-
</tr>
59-
</table>
60-
</td>
61-
</tr>
62-
<tr class="empty-20">
63-
<td class="main-td">
64-
<table class="main-child">
65-
<tr><td></td></tr>
66-
</table>
67-
</td>
68-
</tr>
69-
<tr class="post-details">
70-
<td class="main-td">
71-
<table class="main-child">
76+
<tr class="empty-50">
77+
<td class="main-td">
78+
<table class="main-child">
79+
<tr><td></td></tr>
80+
</table>
81+
</td>
82+
</tr>
83+
<tr class="button-row button-one">
84+
<td class="main-td">
85+
<table class="main-child">
7286
<tr>
7387
<td class="empty-child-one"></td>
74-
<td>If you are enterprise client with SSO, please use the link below to sign in and join the project.</td>
88+
<td class="second-child" align="center">
89+
<a href="{{@root.accountsAppURL}}/connect/registration?retUrl={{@root.connectURL}}/projects/{{projectId}}">
90+
Register
91+
</a>
92+
</td>
93+
<td class="empty-child-one"></td>
7594
</tr>
76-
</table>
77-
</td>
78-
</tr>
79-
<tr class="button-row button-one">
80-
<td class="main-td">
81-
<table class="main-child">
82-
<tr>
83-
<td class="empty-child-one"></td>
84-
<td class="second-child" align="center">
85-
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{projectId}}">
86-
SSO Login
87-
</a>
88-
</td>
89-
<td class="empty-child-one"></td>
90-
</tr>
91-
</table>
92-
</td>
93-
</tr>
95+
</table>
96+
</td>
97+
</tr>
98+
{{/if}}
99+
94100
<tr class="empty-20">
95101
<td class="main-td">
96102
<table class="main-child">

emails/src/partials/project-team.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
<strong>{{userFullName}}</strong> joined the project
5959
{{/if}}
6060
{{#if [notifications.connect.project.member.invite.created]}}
61+
{{#if [isSSO]}}
62+
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please use the link below to sign in and join the project.
63+
{{else}}
6164
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please click on the button ("View project on Connect") below to join.
65+
{{/if}}
6266
{{/if}}
6367
{{#if [notifications.connect.project.member.invite.requested]}}
6468
You are requested to add <strong>{{userFullName}}</strong> as a copilot
@@ -107,9 +111,15 @@
107111
Manage project team
108112
</a>
109113
{{else}}
114+
{{#if notifications.[0].[isSSO]}}
115+
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
116+
SSO Login
117+
</a>
118+
{{else}}
110119
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
111120
View project on Connect
112121
</a>
122+
{{/if}}
113123
{{/if}}
114124
</td>
115125
<td class="empty-child-one"></td>

0 commit comments

Comments
 (0)