@@ -20,31 +20,12 @@ const accountRole = {
2020 ]
2121} ;
2222
23- const hackboardRestrictedRoutes = [ // hackboard permissions is all staff routes minus these routes
24- Constants . Routes . hackerRoutes . postAnySendWeekOfEmail ,
25- Constants . Routes . hackerRoutes . postSelfSendWeekOfEmail ,
26- Constants . Routes . hackerRoutes . postAnySendDayOfEmail ,
27- Constants . Routes . hackerRoutes . postSelfSendDayOfEmail ,
28- Constants . Routes . hackerRoutes . patchAcceptHackerById ,
29- Constants . Routes . hackerRoutes . patchAcceptHackerByEmail ,
30- Constants . Routes . hackerRoutes . patchAcceptHackerByArrayOfIds ,
31- Constants . Routes . hackerRoutes . patchAnyStatusById ,
32- Constants . Routes . settingsRoutes . getSettings ,
33- Constants . Routes . settingsRoutes . patchSettings
34- ] ;
35-
3623const adminRole = {
3724 _id : mongoose . Types . ObjectId . createFromTime ( 1 ) ,
3825 name : Constants . General . STAFF ,
3926 routes : Constants . Routes . listAllRoutes ( )
4027} ;
4128
42- const hackboardRole = {
43- _id : mongoose . Types . ObjectId . createFromTime ( 9 ) ,
44- name : "Hackboard" ,
45- routes : createHackboardRoutes ( )
46- } ;
47-
4829const hackerRole = {
4930 _id : mongoose . Types . ObjectId . createFromTime ( 2 ) ,
5031 name : Constants . General . HACKER ,
@@ -162,15 +143,6 @@ const singularRoles = createAllSingularRoles();
162143const allRolesObject = createAllRoles ( ) ;
163144const allRolesArray = Object . values ( allRolesObject ) ;
164145
165- function createHackboardRoutes ( ) {
166- const restrictedRouteIds = new Set (
167- hackboardRestrictedRoutes . map ( ( route ) => route . _id . toString ( ) )
168- ) ;
169- return Constants . Routes . listAllRoutes ( ) . filter ( ( route ) => {
170- return ! restrictedRouteIds . has ( route . _id . toString ( ) ) ;
171- } ) ;
172- }
173-
174146/**
175147 * Creates all the roles that are of a specific uri and request type
176148 * @return {Role[] }
@@ -213,7 +185,6 @@ function createAllRoles() {
213185 let allRolesObject = {
214186 accountRole : accountRole ,
215187 adminRole : adminRole ,
216- hackboardRole : hackboardRole ,
217188 hackerRole : hackerRole ,
218189 volunteerRole : volunteerRole ,
219190 sponsorT1Role : sponsorT1Role ,
@@ -237,7 +208,6 @@ function createAllRoles() {
237208module . exports = {
238209 accountRole : accountRole ,
239210 adminRole : adminRole ,
240- hackboardRole : hackboardRole ,
241211 hackerRole : hackerRole ,
242212 volunteerRole : volunteerRole ,
243213 sponsorT1Role : sponsorT1Role ,
0 commit comments