Skip to content

Commit c50842f

Browse files
committed
lint fix & restrict routes
1 parent d6916d6 commit c50842f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/apps/review/src/lib/hooks/useFetchScorecard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import useSWR, { SWRResponse } from 'swr'
21
import { sortBy } from 'lodash'
2+
import useSWR, { SWRResponse } from 'swr'
33

44
import { EnvironmentConfig } from '~/config'
55
import { xhrGetAsync } from '~/libs/core'

src/apps/review/src/review-app.routes.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,21 @@ export const reviewRoutes: ReadonlyArray<PlatformRoute> = [
116116
route: ':scorecardId',
117117
},
118118
{
119+
authRequired: true,
119120
element: <EditScorecardPage />,
120121
id: 'edit-scorecard-page',
122+
rolesRequired: [
123+
UserRole.administrator,
124+
],
121125
route: ':scorecardId/edit',
122126
},
123127
{
128+
authRequired: true,
124129
element: <EditScorecardPage />,
125130
id: 'new-scorecard-page',
131+
rolesRequired: [
132+
UserRole.administrator,
133+
],
126134
route: 'new',
127135
},
128136

0 commit comments

Comments
 (0)