Skip to content

Commit a9f1706

Browse files
committed
Adding user types on the search challenges route so it's passed to the searchChallenges function to allow to filter on groups.
1 parent 9e51318 commit a9f1706

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

app-constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*/
44
const UserRoles = {
55
Admin: 'Administrator',
6-
Copilot: 'Copilot'
6+
Copilot: 'Copilot',
7+
User: 'Topcoder User'
78
}
89

910
const prizeSetTypes = {

src/routes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = {
1616
get: {
1717
controller: 'ChallengeController',
1818
method: 'searchChallenges',
19+
access: [constants.UserRoles.Admin, constants.UserRoles.Copilot, constants.UserRoles.User],
1920
scopes: [READ, ALL]
2021
},
2122
post: {

src/scripts/seed/ChallengeType.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,5 +229,69 @@
229229
"description": "Private or TCX task",
230230
"isActive": true,
231231
"abbreviation": "TASK"
232+
},
233+
{
234+
"id": "482bd567-1805-43c9-bc8e-1c35a1911f21",
235+
"name": "RIA Component Competition",
236+
"description": "RIA Component Competition",
237+
"isActive": false,
238+
"abbreviation": "RIA_COMPONENT_COMPETITION",
239+
"legacyId": 25
240+
},
241+
{
242+
"id": "8cc52d02-2dde-4f0d-b329-4c052cec084d",
243+
"name": "Testing Competition",
244+
"description": "Testing Competition",
245+
"isActive": false,
246+
"abbreviation": "TESTING_COMPETITION",
247+
"legacyId": 5
248+
},
249+
{
250+
"id": "94c70199-bf7a-4219-9a60-d5dd2ff48895",
251+
"name": "Reporting",
252+
"description": "Reporting",
253+
"isActive": false,
254+
"abbreviation": "REPORTING",
255+
"legacyId": 36
256+
},
257+
{
258+
"id": "ecaac74c-b165-4448-ab5c-dc770a99cdb8",
259+
"name": "Process",
260+
"description": "Process",
261+
"isActive": false,
262+
"abbreviation": "PROCESS",
263+
"legacyId": 12
264+
},
265+
{
266+
"id": "40fe2fc7-3cd7-432e-9a4c-04d8889947b9",
267+
"name": "Legacy",
268+
"description": "Legacy",
269+
"isActive": false,
270+
"abbreviation": "LEGACY",
271+
"legacyId": 15
272+
},
273+
{
274+
"id": "428d3337-e7c8-45b2-ad76-cbce783975d3",
275+
"name": "Security",
276+
"description": "Security",
277+
"isActive": false,
278+
"abbreviation": "Security",
279+
"legacyId": 3
280+
},
281+
{
282+
"id": "59954448-d1bf-4aef-83f4-2a5602f0f686",
283+
"name": "Deployment",
284+
"description": "Deployment",
285+
"isActive": false,
286+
"abbreviation": "DEPLOYMENT",
287+
"legacyId": 10
288+
},
289+
{
290+
"id": "1047be9d-4b9e-461d-b875-d03883b00502",
291+
"name": "Component Production",
292+
"description": "Component Production",
293+
"isActive": false,
294+
"abbreviation": "COMPONENT_PRODUCTION",
295+
"legacyId": 8
232296
}
233297
]

0 commit comments

Comments
 (0)