Skip to content

Commit b257b51

Browse files
Merge pull request #1195 from topcoder-platform/PM-1502
PM-1502 Add auth before routing
2 parents 2e832a4 + 63bc500 commit b257b51

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
LazyLoadedComponent,
88
PlatformRoute,
99
Rewrite,
10+
UserRole,
1011
} from '~/libs/core'
1112

1213
import {
@@ -95,6 +96,7 @@ export const reviewRoutes: ReadonlyArray<PlatformRoute> = [
9596
route: activeReviewAssigmentsRouteId,
9697
},
9798
{
99+
authRequired: true,
98100
children: [
99101
{
100102
element: <ScorecardsListPage />,
@@ -110,6 +112,9 @@ export const reviewRoutes: ReadonlyArray<PlatformRoute> = [
110112
],
111113
element: <ScorecardsContainer />,
112114
id: scorecardRouteId,
115+
rolesRequired: [
116+
UserRole.administrator,
117+
],
113118
route: scorecardRouteId,
114119
},
115120
],

src/libs/shared/lib/containers/auth/restricted-page/RestrictedPage.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.contentLayout {
44
width: 100%;
55
padding-bottom: 0;
6+
height: $content-height;
67

78
.contentLayout-outer {
89
width: 100%;

0 commit comments

Comments
 (0)