Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/apps/talent-search/src/talent-search.routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ export const TALENT_SEARCH_PATHS = {

export const toolTitle: string = ToolTitle.talentSearch

const isAdminRestricted = EnvironmentConfig.RESTRICT_TALENT_SEARCH

export const talentSearchRoutes: ReadonlyArray<PlatformRoute> = [
{
authRequired: true,
authRequired: isAdminRestricted,
children: [
{
element: <SearchPage />,
Expand All @@ -46,9 +48,9 @@ export const talentSearchRoutes: ReadonlyArray<PlatformRoute> = [
domain: AppSubdomain.talentSearch,
element: <TalentSearchAppRoot />,
id: toolTitle,
rolesRequired: [
rolesRequired: isAdminRestricted ? [
UserRole.administrator,
],
] : undefined,
route: rootRoute,
},
]
2 changes: 2 additions & 0 deletions src/config/environments/default.env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ export const DICE_VERIFY_URL = get({
prod: 'https://accounts-auth0.topcoder.com',
qa: 'https://accounts-auth0.topcoder-qa.com',
}, ENV, 'https://accounts-auth0.topcoder.com')

export const RESTRICT_TALENT_SEARCH = getReactEnv<boolean>('RESTRICT_TALENT_SEARCH', false)
1 change: 1 addition & 0 deletions src/config/environments/global-config.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ export interface GlobalConfig {
SUBDOMAIN: string,
GAMIFICATION_ORG_ID: string
DICE_VERIFY_URL: string
RESTRICT_TALENT_SEARCH: boolean
}