diff --git a/src/apps/accounts/src/lib/assets/security/dicelogo.png b/src/apps/accounts/src/lib/assets/security/dicelogo.png
deleted file mode 100644
index 723b63b2e..000000000
Binary files a/src/apps/accounts/src/lib/assets/security/dicelogo.png and /dev/null differ
diff --git a/src/apps/accounts/src/lib/assets/security/dicelogobig.png b/src/apps/accounts/src/lib/assets/security/dicelogobig.png
deleted file mode 100644
index b18935081..000000000
Binary files a/src/apps/accounts/src/lib/assets/security/dicelogobig.png and /dev/null differ
diff --git a/src/apps/accounts/src/lib/assets/security/dicelogosmall.png b/src/apps/accounts/src/lib/assets/security/dicelogosmall.png
deleted file mode 100644
index c2be4e4a8..000000000
Binary files a/src/apps/accounts/src/lib/assets/security/dicelogosmall.png and /dev/null differ
diff --git a/src/apps/accounts/src/lib/assets/security/index.ts b/src/apps/accounts/src/lib/assets/security/index.ts
index 4559e27b4..efa8c4123 100644
--- a/src/apps/accounts/src/lib/assets/security/index.ts
+++ b/src/apps/accounts/src/lib/assets/security/index.ts
@@ -1,17 +1,9 @@
-import { ReactComponent as MFAImage } from './mfa.svg'
import { ReactComponent as AppleStore } from './apple-store.svg'
import credentialImage from './credential.png'
-import diceIdLogo from './dicelogo.png'
-import diceIdLogoBig from './dicelogobig.png'
-import diceIdLogoSmall from './dicelogosmall.png'
import googlePlay from './google-play.png'
export {
AppleStore,
credentialImage,
- diceIdLogo,
- diceIdLogoBig,
- diceIdLogoSmall,
googlePlay,
- MFAImage,
}
diff --git a/src/apps/accounts/src/lib/assets/security/mfa.svg b/src/apps/accounts/src/lib/assets/security/mfa.svg
deleted file mode 100644
index 33b5ab0cc..000000000
--- a/src/apps/accounts/src/lib/assets/security/mfa.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx b/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx
index de3fcb6af..2f0bf6b33 100644
--- a/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx
+++ b/src/apps/admin/src/lib/components/ChallengeList/ChallengeList.tsx
@@ -218,6 +218,15 @@ const Actions: FC<{
classNames={{ menu: 'challenge-list-actions-dropdown-menu' }}
>
+ -
+
+ Challenge Details
+
+
-
{hasProjectId && (
= props => {
renderer: (challenge: Challenge) => (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
{challenge.name}
@@ -334,6 +342,7 @@ const ChallengeList: FC = props => {
disableSorting
onToggleSort={_.noop}
className={styles.desktopTable}
+ preventDefault
/>
)}
{screenWidth <= 1279 && (
diff --git a/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx b/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
index ac76eaa43..d07f5aa23 100644
--- a/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
+++ b/src/apps/copilots/src/pages/copilot-opportunity-details/index.tsx
@@ -86,12 +86,8 @@ const CopilotOpportunityDetails: FC<{}> = () => {
const [activeTab, setActiveTab]: [string, Dispatch>] = useState(activeTabHash)
useEffect(() => {
- if (isAdminOrPM) {
- setActiveTab(activeTabHash)
- } else {
- setActiveTab('0')
- }
- }, [activeTabHash, isAdminOrPM])
+ setActiveTab(activeTabHash)
+ }, [activeTabHash])
const handleTabChange = useCallback((tabId: string): void => {
setActiveTab(tabId)
@@ -286,7 +282,7 @@ const CopilotOpportunityDetails: FC<{}> = () => {
)
}
@@ -297,7 +293,7 @@ const CopilotOpportunityDetails: FC<{}> = () => {
opportunity={opportunity}
members={members}
onApplied={onApplied}
- isAdminOrPM
+ isAdminOrPM={isAdminOrPM}
/>
)}
diff --git a/src/apps/copilots/src/pages/copilot-opportunity-details/tabs/config/copilot-details-tabs-config.ts b/src/apps/copilots/src/pages/copilot-opportunity-details/tabs/config/copilot-details-tabs-config.ts
index eae8d49b5..907a7d561 100644
--- a/src/apps/copilots/src/pages/copilot-opportunity-details/tabs/config/copilot-details-tabs-config.ts
+++ b/src/apps/copilots/src/pages/copilot-opportunity-details/tabs/config/copilot-details-tabs-config.ts
@@ -5,7 +5,7 @@ export enum CopilotDetailsTabViews {
applications = '1',
}
-export const getCopilotDetailsTabsConfig = (isAdminOrPM: boolean, count: number): TabsNavItem[] => (isAdminOrPM ? [
+export const getCopilotDetailsTabsConfig = (count: number): TabsNavItem[] => ([
{
id: CopilotDetailsTabViews.details,
title: 'Details',
@@ -18,11 +18,6 @@ export const getCopilotDetailsTabsConfig = (isAdminOrPM: boolean, count: number)
id: CopilotDetailsTabViews.applications,
title: 'Applications',
},
-] : [
- {
- id: CopilotDetailsTabViews.details,
- title: 'Details',
- },
])
export const CopilotDetailsTabsConfig: TabsNavItem[] = [
diff --git a/src/apps/copilots/src/services/copilot-opportunities.ts b/src/apps/copilots/src/services/copilot-opportunities.ts
index 61cebb6d7..07292b9c7 100644
--- a/src/apps/copilots/src/services/copilot-opportunities.ts
+++ b/src/apps/copilots/src/services/copilot-opportunities.ts
@@ -23,7 +23,7 @@ function copilotOpportunityFactory(data: any): CopilotOpportunity {
return {
...data,
...data.data,
- projectName: data.project.name,
+ projectName: data.project?.name,
}
}
diff --git a/src/apps/learn/src/certification-details/enroll-cta-btn/EnrollCtaBtn.tsx b/src/apps/learn/src/certification-details/enroll-cta-btn/EnrollCtaBtn.tsx
index 6c29627f8..2c19e954f 100644
--- a/src/apps/learn/src/certification-details/enroll-cta-btn/EnrollCtaBtn.tsx
+++ b/src/apps/learn/src/certification-details/enroll-cta-btn/EnrollCtaBtn.tsx
@@ -1,12 +1,10 @@
-import { Dispatch, FC, SetStateAction, useCallback, useContext, useState } from 'react'
+import { FC, useCallback, useContext } from 'react'
import { NavigateFunction, useNavigate } from 'react-router-dom'
import { Button } from '~/libs/ui'
import { profileContext, ProfileContextData } from '~/libs/core'
import { getAuthenticateAndEnrollRoute, getTCACertificationEnrollPath } from '../../learn.routes'
-import { LearnConfig } from '../../config'
-import { DiceModal } from '../../course-details/course-curriculum/dice-modal'
interface EnrollCtaBtnProps {
certification: string
@@ -15,15 +13,9 @@ interface EnrollCtaBtnProps {
const EnrollCtaBtn: FC = (props: EnrollCtaBtnProps) => {
const navigate: NavigateFunction = useNavigate()
const { initialized: profileReady, profile }: ProfileContextData = useContext(profileContext)
- const [isDiceModalOpen, setIsDiceModalOpen]: [boolean, Dispatch>]
- = useState(false)
const isLoggedIn: boolean = profileReady && !!profile
- function onDiceModalClose(): void {
- setIsDiceModalOpen(false)
- }
-
/**
* Handle user click on start course/resume/login button
*/
@@ -37,15 +29,8 @@ const EnrollCtaBtn: FC = (props: EnrollCtaBtnProps) => {
return
}
- // if the user is wipro and s/he hasn't set up DICE,
- // let the user know
- if (LearnConfig.REQUIRE_DICE_ID && profile?.isWipro && !profile.diceEnabled) {
- setIsDiceModalOpen(true)
- return
- }
-
navigate(getTCACertificationEnrollPath(props.certification))
- }, [isLoggedIn, profile?.isWipro, profile?.diceEnabled, props, navigate])
+ }, [isLoggedIn, props, navigate])
return (
<>
@@ -55,11 +40,6 @@ const EnrollCtaBtn: FC = (props: EnrollCtaBtnProps) => {
label={isLoggedIn ? 'Enroll Now' : 'Log in to enroll'}
onClick={handleEnrollClick}
/>
-
-
>
)
}
diff --git a/src/apps/learn/src/config/learn-config.model.ts b/src/apps/learn/src/config/learn-config.model.ts
index 876fd8363..7a68f6a33 100644
--- a/src/apps/learn/src/config/learn-config.model.ts
+++ b/src/apps/learn/src/config/learn-config.model.ts
@@ -7,5 +7,4 @@ export interface LearnConfigModel {
value: string,
}
CLIENT: string
- REQUIRE_DICE_ID: boolean | undefined
}
diff --git a/src/apps/learn/src/config/learn.default.config.ts b/src/apps/learn/src/config/learn.default.config.ts
index 7cb9bbd26..799fd2b3f 100644
--- a/src/apps/learn/src/config/learn.default.config.ts
+++ b/src/apps/learn/src/config/learn.default.config.ts
@@ -1,5 +1,4 @@
import { EnvironmentConfig } from '~/config'
-import { getReactEnv } from '~/config/environments/react-env'
import { LearnConfigModel } from './learn-config.model'
@@ -14,5 +13,4 @@ export const LearnConfigDefault: LearnConfigModel = {
value: 'certificate-container',
},
CLIENT: 'https://fcc.topcoder-dev.com:4431',
- REQUIRE_DICE_ID: `${getReactEnv('REQUIRE_DICE_ID', '')}` === 'true',
}
diff --git a/src/apps/learn/src/course-details/course-curriculum/CourseCurriculum.tsx b/src/apps/learn/src/course-details/course-curriculum/CourseCurriculum.tsx
index ecc87c9e2..abb253e52 100644
--- a/src/apps/learn/src/course-details/course-curriculum/CourseCurriculum.tsx
+++ b/src/apps/learn/src/course-details/course-curriculum/CourseCurriculum.tsx
@@ -22,11 +22,9 @@ import {
getLessonPathFromCurrentLesson,
LEARN_PATHS,
} from '../../learn.routes'
-import { LearnConfig } from '../../config'
import { CurriculumSummary } from './curriculum-summary'
import { TcAcademyPolicyModal } from './tc-academy-policy-modal'
-import { DiceModal } from './dice-modal'
import styles from './CourseCurriculum.module.scss'
interface CourseCurriculumProps {
@@ -47,8 +45,6 @@ const CourseCurriculum: FC = (props: CourseCurriculumProp
const [isTcAcademyPolicyModal, setIsTcAcademyPolicyModal]: [boolean, Dispatch>]
= useState(false)
- const [isDiceModalOpen, setIsDiceModalOpen]: [boolean, Dispatch>]
- = useState(false)
const status: string = props.progress?.status ?? UserCertificationProgressStatus.inititialized
const completedPercentage: number = (props.progress?.courseProgressPercentage ?? 0) / 100
@@ -98,17 +94,6 @@ const CourseCurriculum: FC = (props: CourseCurriculumProp
return
}
- // if the user is wipro and s/he hasn't set up DICE,
- // let the user know
- if (
- LearnConfig.REQUIRE_DICE_ID
- && props.profile?.isWipro
- && !props.profile.diceEnabled
- ) {
- setIsDiceModalOpen(true)
- return
- }
-
// Check if user accepted policy and resume(or start) the course
if (props.progress?.academicHonestyPolicyAcceptedAt) {
handleStartCourse()
@@ -188,10 +173,6 @@ const CourseCurriculum: FC = (props: CourseCurriculumProp
setIsTcAcademyPolicyModal(false)
}
- function onDiceModalClose(): void {
- setIsDiceModalOpen(false)
- }
-
return (
<>
@@ -232,11 +213,6 @@ const CourseCurriculum: FC
= (props: CourseCurriculumProp
onClose={onAcademicHonestyModalClose}
onConfirm={handlePolicyAccept}
/>
-
-
>
)
}
diff --git a/src/apps/learn/src/course-details/course-curriculum/dice-modal/DiceModal.module.scss b/src/apps/learn/src/course-details/course-curriculum/dice-modal/DiceModal.module.scss
deleted file mode 100644
index 974999840..000000000
--- a/src/apps/learn/src/course-details/course-curriculum/dice-modal/DiceModal.module.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-@import '@libs/ui/styles/includes';
-
-.diceModal {
-
- p {
- margin-bottom: $sp-4;
-
- &.buttonContainer {
- display: flex;
- justify-content: center;
- }
- }
-}
diff --git a/src/apps/learn/src/course-details/course-curriculum/dice-modal/DiceModal.tsx b/src/apps/learn/src/course-details/course-curriculum/dice-modal/DiceModal.tsx
deleted file mode 100644
index edf2f89d2..000000000
--- a/src/apps/learn/src/course-details/course-curriculum/dice-modal/DiceModal.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import { Dispatch, FC, SetStateAction, useEffect, useState } from 'react'
-
-import { EnvironmentConfig } from '~/config'
-import { BaseModal, Button } from '~/libs/ui'
-
-import styles from './DiceModal.module.scss'
-
-const preventDefault = (ev: any): void => {
- ev?.preventDefault?.()
-}
-
-interface DiceModalProps {
- isOpen: boolean
- onClose: () => void
-}
-
-const DiceModal: FC = (props: DiceModalProps) => {
-
- const [isOpen, setIsOpen]: [boolean, Dispatch>]
- = useState(false)
-
- useEffect(() => {
- setIsOpen(props.isOpen)
- }, [props.isOpen])
-
- return (
-
-
-
-
- Wipro requires employees to enable Multifactor Authentication
- with DICE ID in order to take Topcoder Academy courses.
-
-
- Please go to Account Settings to configure your account.
-
-
-
-
-
-
-
- When you have completed configuring your account,
- click below to refresh your settings.
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default DiceModal
diff --git a/src/apps/learn/src/course-details/course-curriculum/dice-modal/index.ts b/src/apps/learn/src/course-details/course-curriculum/dice-modal/index.ts
deleted file mode 100644
index b74a55774..000000000
--- a/src/apps/learn/src/course-details/course-curriculum/dice-modal/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { default as DiceModal } from './DiceModal'
diff --git a/src/apps/learn/src/free-code-camp/FreeCodeCamp.tsx b/src/apps/learn/src/free-code-camp/FreeCodeCamp.tsx
index 819cad557..db164a3e5 100644
--- a/src/apps/learn/src/free-code-camp/FreeCodeCamp.tsx
+++ b/src/apps/learn/src/free-code-camp/FreeCodeCamp.tsx
@@ -50,7 +50,6 @@ import {
getCoursePath,
getLessonPathFromModule,
} from '../learn.routes'
-import { LearnConfig } from '../config'
import { CoursePageContextValue, useCoursePageContext } from '../course-page-wrapper'
import { useCheckAndMarkCourseCompleted } from './hooks/use-mark-course-completed'
@@ -410,7 +409,7 @@ const FreeCodeCamp: FC<{}> = () => {
/**
* Check if the user accepted the academic honesty policy
- * and either is not a wipro user or the wipro user has dice enabled.
+ * and either is not a wipro user.
* if not, redirect user to course details page to accept the policy
*/
useLayoutEffect(() => {
@@ -421,11 +420,9 @@ const FreeCodeCamp: FC<{}> = () => {
}
// if the user is logged in,
- // and the user is a either not wipro user or is a wipro user with dice enabled,
// and if the user has accepted the academic honesty policy,
// the user is permitted to take the course, so there's nothing to do.
if (isLoggedIn
- && (!LearnConfig.REQUIRE_DICE_ID || !profile?.isWipro || !!profile?.diceEnabled)
&& !!certificateProgress?.academicHonestyPolicyAcceptedAt) {
return
}
diff --git a/src/apps/wallet-admin/src/lib/assets/security/dicelogo.png b/src/apps/wallet-admin/src/lib/assets/security/dicelogo.png
deleted file mode 100644
index 723b63b2e..000000000
Binary files a/src/apps/wallet-admin/src/lib/assets/security/dicelogo.png and /dev/null differ
diff --git a/src/apps/wallet-admin/src/lib/assets/security/dicelogobig.png b/src/apps/wallet-admin/src/lib/assets/security/dicelogobig.png
deleted file mode 100644
index b18935081..000000000
Binary files a/src/apps/wallet-admin/src/lib/assets/security/dicelogobig.png and /dev/null differ
diff --git a/src/apps/wallet-admin/src/lib/assets/security/dicelogosmall.png b/src/apps/wallet-admin/src/lib/assets/security/dicelogosmall.png
deleted file mode 100644
index c2be4e4a8..000000000
Binary files a/src/apps/wallet-admin/src/lib/assets/security/dicelogosmall.png and /dev/null differ
diff --git a/src/apps/wallet-admin/src/lib/assets/security/index.ts b/src/apps/wallet-admin/src/lib/assets/security/index.ts
index 4559e27b4..efa8c4123 100644
--- a/src/apps/wallet-admin/src/lib/assets/security/index.ts
+++ b/src/apps/wallet-admin/src/lib/assets/security/index.ts
@@ -1,17 +1,9 @@
-import { ReactComponent as MFAImage } from './mfa.svg'
import { ReactComponent as AppleStore } from './apple-store.svg'
import credentialImage from './credential.png'
-import diceIdLogo from './dicelogo.png'
-import diceIdLogoBig from './dicelogobig.png'
-import diceIdLogoSmall from './dicelogosmall.png'
import googlePlay from './google-play.png'
export {
AppleStore,
credentialImage,
- diceIdLogo,
- diceIdLogoBig,
- diceIdLogoSmall,
googlePlay,
- MFAImage,
}
diff --git a/src/apps/wallet-admin/src/lib/assets/security/mfa.svg b/src/apps/wallet-admin/src/lib/assets/security/mfa.svg
deleted file mode 100644
index 33b5ab0cc..000000000
--- a/src/apps/wallet-admin/src/lib/assets/security/mfa.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/src/apps/wallet/src/lib/assets/security/dicelogo.png b/src/apps/wallet/src/lib/assets/security/dicelogo.png
deleted file mode 100644
index 723b63b2e..000000000
Binary files a/src/apps/wallet/src/lib/assets/security/dicelogo.png and /dev/null differ
diff --git a/src/apps/wallet/src/lib/assets/security/dicelogobig.png b/src/apps/wallet/src/lib/assets/security/dicelogobig.png
deleted file mode 100644
index b18935081..000000000
Binary files a/src/apps/wallet/src/lib/assets/security/dicelogobig.png and /dev/null differ
diff --git a/src/apps/wallet/src/lib/assets/security/dicelogosmall.png b/src/apps/wallet/src/lib/assets/security/dicelogosmall.png
deleted file mode 100644
index c2be4e4a8..000000000
Binary files a/src/apps/wallet/src/lib/assets/security/dicelogosmall.png and /dev/null differ
diff --git a/src/apps/wallet/src/lib/assets/security/index.ts b/src/apps/wallet/src/lib/assets/security/index.ts
index 4559e27b4..efa8c4123 100644
--- a/src/apps/wallet/src/lib/assets/security/index.ts
+++ b/src/apps/wallet/src/lib/assets/security/index.ts
@@ -1,17 +1,9 @@
-import { ReactComponent as MFAImage } from './mfa.svg'
import { ReactComponent as AppleStore } from './apple-store.svg'
import credentialImage from './credential.png'
-import diceIdLogo from './dicelogo.png'
-import diceIdLogoBig from './dicelogobig.png'
-import diceIdLogoSmall from './dicelogosmall.png'
import googlePlay from './google-play.png'
export {
AppleStore,
credentialImage,
- diceIdLogo,
- diceIdLogoBig,
- diceIdLogoSmall,
googlePlay,
- MFAImage,
}
diff --git a/src/apps/wallet/src/lib/assets/security/mfa.svg b/src/apps/wallet/src/lib/assets/security/mfa.svg
deleted file mode 100644
index 33b5ab0cc..000000000
--- a/src/apps/wallet/src/lib/assets/security/mfa.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/src/libs/core/lib/auth/user-functions/index.ts b/src/libs/core/lib/auth/user-functions/index.ts
index 7a5ad1a47..d406614d2 100644
--- a/src/libs/core/lib/auth/user-functions/index.ts
+++ b/src/libs/core/lib/auth/user-functions/index.ts
@@ -1,4 +1,3 @@
export {
- getDiceStatusAsync as userGetDiceStatusAsync,
updatePasswordAsync as userUpdatePasswordAsync,
} from './user.functions'
diff --git a/src/libs/core/lib/auth/user-functions/user-store/index.ts b/src/libs/core/lib/auth/user-functions/user-store/index.ts
index 5e88d6a17..28b205023 100644
--- a/src/libs/core/lib/auth/user-functions/user-store/index.ts
+++ b/src/libs/core/lib/auth/user-functions/user-store/index.ts
@@ -1,5 +1,4 @@
export {
- getMfaStatusAsync as userStoreGetMfaStatusAsync,
patchAsync as userStorePatchAsync,
} from './user-xhr.store'
export { type UserPatchRequest } from './user-xhr.store'
diff --git a/src/libs/core/lib/auth/user-functions/user-store/user-xhr.store.ts b/src/libs/core/lib/auth/user-functions/user-store/user-xhr.store.ts
index e133b8385..c644c3017 100644
--- a/src/libs/core/lib/auth/user-functions/user-store/user-xhr.store.ts
+++ b/src/libs/core/lib/auth/user-functions/user-store/user-xhr.store.ts
@@ -1,17 +1,8 @@
-import { xhrGetAsync, xhrPatchAsync } from '../../../xhr'
+import { xhrPatchAsync } from '../../../xhr'
import { AuthUser } from '../../authentication-functions/auth-user.model'
import { user as userEndpoint } from './user-endpoint.config'
-export interface MfaStatusResult {
- result: {
- content: {
- diceEnabled: boolean
- mfaEnabled: boolean
- }
- }
-}
-
export interface UserPatchRequest {
param: {
credential: {
@@ -21,10 +12,6 @@ export interface UserPatchRequest {
}
}
-export async function getMfaStatusAsync(userId: number): Promise {
- return xhrGetAsync(`${userEndpoint(userId)}/2fa`)
-}
-
export async function patchAsync(userId: number, request: UserPatchRequest): Promise {
const url: string = userEndpoint(userId)
return xhrPatchAsync(url, request)
diff --git a/src/libs/core/lib/auth/user-functions/user.functions.ts b/src/libs/core/lib/auth/user-functions/user.functions.ts
index 613e7100c..2ba611493 100644
--- a/src/libs/core/lib/auth/user-functions/user.functions.ts
+++ b/src/libs/core/lib/auth/user-functions/user.functions.ts
@@ -1,10 +1,4 @@
-import { UserPatchRequest, userStoreGetMfaStatusAsync, userStorePatchAsync } from './user-store'
-import { MfaStatusResult } from './user-store/user-xhr.store'
-
-export async function getDiceStatusAsync(userId: number): Promise {
- const result: MfaStatusResult = await userStoreGetMfaStatusAsync(userId)
- return !!result.result.content.mfaEnabled && !!result.result.content.diceEnabled
-}
+import { UserPatchRequest, userStorePatchAsync } from './user-store'
export async function updatePasswordAsync(userId: number, currentPassword: string, password: string): Promise {
const request: UserPatchRequest = {
diff --git a/src/libs/core/lib/profile/data-providers/index.ts b/src/libs/core/lib/profile/data-providers/index.ts
index 41e6581cc..b4511c660 100644
--- a/src/libs/core/lib/profile/data-providers/index.ts
+++ b/src/libs/core/lib/profile/data-providers/index.ts
@@ -5,8 +5,6 @@ export * from './useUserCompletedCertifications'
export * from './useStatsHistory'
export * from './useStatsDistribution'
export * from './useMemberEmailPreferences'
-export * from './useMemberMFAStatus'
-export * from './useDiceIdConnection'
export * from './useMemberTraits'
export * from './useMemberDevicesLookup'
export * from './useCountryLookup'
diff --git a/src/libs/core/lib/profile/data-providers/useDiceIdConnection.ts b/src/libs/core/lib/profile/data-providers/useDiceIdConnection.ts
deleted file mode 100644
index d86e3c30c..000000000
--- a/src/libs/core/lib/profile/data-providers/useDiceIdConnection.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import useSWR, { SWRConfiguration, SWRResponse } from 'swr'
-
-import { diceIDURL } from '~/libs/core'
-
-export interface DiceConnectionStatus {
- accepted: boolean
- connection: string | null
- diceEnabled: boolean
-}
-
-export function useDiceIdConnection(userId: number): DiceConnectionStatus | undefined {
- const options: SWRConfiguration = { refreshInterval: 5000 } // pooling interval 5s
-
- const { data }: SWRResponse
- = useSWR(`${diceIDURL(userId)}/diceConnection`, options)
-
- return data ? data.result.content : undefined
-}
diff --git a/src/libs/core/lib/profile/data-providers/useMemberMFAStatus.ts b/src/libs/core/lib/profile/data-providers/useMemberMFAStatus.ts
deleted file mode 100644
index 844b5a496..000000000
--- a/src/libs/core/lib/profile/data-providers/useMemberMFAStatus.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import useSWR, { KeyedMutator, SWRResponse } from 'swr'
-
-import { memberModifyMfaURL } from '~/libs/core'
-
-export interface MemberMFAStatus {
- createdAt: Date
- createdBy: number
- diceEnabled: boolean
- id: number
- mfaEnabled: boolean
- modifiedAt: Date
- modifiedBy: number
- userId: number
-}
-
-export interface UseMemberMFAStatusAPI {
- data: MemberMFAStatus | undefined
- mutate: KeyedMutator
-}
-
-export function useMemberMFAStatus(userId: number): UseMemberMFAStatusAPI {
- const { data, mutate }: SWRResponse = useSWR(memberModifyMfaURL(userId))
-
- return {
- data: data ? data.result.content : undefined,
- mutate,
- }
-}
diff --git a/src/libs/core/lib/profile/index.ts b/src/libs/core/lib/profile/index.ts
index 87b18783d..df5249fd8 100644
--- a/src/libs/core/lib/profile/index.ts
+++ b/src/libs/core/lib/profile/index.ts
@@ -11,7 +11,6 @@ export * from './user-badge.model'
export * from './modify-user-role.model'
export * from './user-email-preference.model'
export * from './modify-user-email-preferences.model'
-export * from './modify-user-mfa.model'
export * from './user-traits.model'
export * from './modify-tracks.request'
export * from './modify-user-profile.model'
diff --git a/src/libs/core/lib/profile/modify-user-mfa.model.ts b/src/libs/core/lib/profile/modify-user-mfa.model.ts
deleted file mode 100644
index 1fda94156..000000000
--- a/src/libs/core/lib/profile/modify-user-mfa.model.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-export interface ModifyUserMFARequest {
- param: {
- mfaEnabled?: boolean
- diceEnabled?: boolean
- }
-}
-
-export interface ModifyUserMFAResponse {
- id: string
- result: {
- content: {
- mfaEnabled: boolean
- diceEnabled: boolean
- },
- success: boolean
- }
-}
diff --git a/src/libs/core/lib/profile/profile-functions/index.ts b/src/libs/core/lib/profile/profile-functions/index.ts
index fd4a249c6..ed8ec1d6c 100644
--- a/src/libs/core/lib/profile/profile-functions/index.ts
+++ b/src/libs/core/lib/profile/profile-functions/index.ts
@@ -8,7 +8,6 @@ export {
editNameAsync as profileEditNameAsync,
updatePrimaryMemberRoleAsync,
updateMemberEmailPreferencesAsync,
- updateMemberMFAStatusAsync,
updateMemberPasswordAsync,
updateMemberTraitsAsync,
createMemberTraitsAsync,
diff --git a/src/libs/core/lib/profile/profile-functions/profile-factory/profile.factory.ts b/src/libs/core/lib/profile/profile-functions/profile-factory/profile.factory.ts
index 23e62c088..a17be2d18 100644
--- a/src/libs/core/lib/profile/profile-functions/profile-factory/profile.factory.ts
+++ b/src/libs/core/lib/profile/profile-functions/profile-factory/profile.factory.ts
@@ -3,7 +3,7 @@ import { UserProfile } from '../../user-profile.model'
import { UserRole } from './user-role.enum'
-export function create(profile: UserProfile, token?: TokenModel, hasDiceEnabled?: boolean): UserProfile {
+export function create(profile: UserProfile, token?: TokenModel): UserProfile {
// Currently, the "Self-Service Customer" role is being set when a user is created
// during the self-service workflow. There are no other roles being set to distinguish
@@ -16,7 +16,6 @@ export function create(profile: UserProfile, token?: TokenModel, hasDiceEnabled?
profile.isMember = !profile.isCustomer
profile.isWipro = profile.email?.endsWith('@wipro.com')
- profile.diceEnabled = !!hasDiceEnabled
// store roles for custom capability checks
profile.roles = token?.roles || []
diff --git a/src/libs/core/lib/profile/profile-functions/profile-store/index.ts b/src/libs/core/lib/profile/profile-functions/profile-store/index.ts
index 39e376a86..f74524d04 100644
--- a/src/libs/core/lib/profile/profile-functions/profile-store/index.ts
+++ b/src/libs/core/lib/profile/profile-functions/profile-store/index.ts
@@ -12,7 +12,5 @@ export {
learnBaseURL,
memberStatsDistroURL,
memberEmailPreferencesURL,
- memberModifyMfaURL,
- diceIDURL,
userSkillsUrl,
} from './profile-endpoint.config'
diff --git a/src/libs/core/lib/profile/profile-functions/profile-store/profile-endpoint.config.ts b/src/libs/core/lib/profile/profile-functions/profile-store/profile-endpoint.config.ts
index a8dc69dea..757842fb8 100644
--- a/src/libs/core/lib/profile/profile-functions/profile-store/profile-endpoint.config.ts
+++ b/src/libs/core/lib/profile/profile-functions/profile-store/profile-endpoint.config.ts
@@ -39,14 +39,6 @@ export function memberEmailPreferencesURL(): string {
return `https://community-app.${EnvironmentConfig.TC_DOMAIN}/api/mailchimp/28bfd3c062/members`
}
-export function memberModifyMfaURL(userId: number): string {
- return `${EnvironmentConfig.API.V3}/users/${userId}/2fa`
-}
-
-export function diceIDURL(userId: number): string {
- return `${EnvironmentConfig.API.V3}/users/${userId}`
-}
-
export function userSkillsUrl(userIdOrAction: string): string {
return `${EnvironmentConfig.API.V5}/standardized-skills/user-skills/${userIdOrAction}`
}
diff --git a/src/libs/core/lib/profile/profile-functions/profile-store/profile-xhr.store.ts b/src/libs/core/lib/profile/profile-functions/profile-store/profile-xhr.store.ts
index 84966a017..3272b716b 100644
--- a/src/libs/core/lib/profile/profile-functions/profile-store/profile-xhr.store.ts
+++ b/src/libs/core/lib/profile/profile-functions/profile-store/profile-xhr.store.ts
@@ -3,7 +3,6 @@ import { CountryLookup } from '../../country-lookup.model'
import { EditNameRequest } from '../../edit-name-request.model'
import { ModifyTracksRequest } from '../../modify-tracks.request'
import { ModifyMemberEmailPreferencesRequest } from '../../modify-user-email-preferences.model'
-import { ModifyUserMFARequest, ModifyUserMFAResponse } from '../../modify-user-mfa.model'
import { UpdateProfileRequest, UserPhotoUpdateResponse } from '../../modify-user-profile.model'
import { ModifyUserPropertyRequest, ModifyUserPropertyResponse } from '../../modify-user-role.model'
import { UserEmailPreferences } from '../../user-email-preference.model'
@@ -15,7 +14,6 @@ import { UserVerify } from '../../user-verify.model'
import {
countryLookupURL,
memberEmailPreferencesURL,
- memberModifyMfaURL,
memberModifyURL,
profile as profileUrl,
verify as verifyUrl,
@@ -63,13 +61,6 @@ export async function updateMemberEmailPreferences(
)
}
-export async function updateMemberMFA(userId: number, payload: ModifyUserMFARequest): Promise {
- return xhrPatchAsync(
- memberModifyMfaURL(userId),
- payload,
- )
-}
-
export async function updateMemberPassword(
userId: number,
currentPassword: string,
diff --git a/src/libs/core/lib/profile/profile-functions/profile.functions.ts b/src/libs/core/lib/profile/profile-functions/profile.functions.ts
index 1f1e482bd..581723f3a 100644
--- a/src/libs/core/lib/profile/profile-functions/profile.functions.ts
+++ b/src/libs/core/lib/profile/profile-functions/profile.functions.ts
@@ -1,9 +1,8 @@
-import { tokenGetAsync, TokenModel, userGetDiceStatusAsync } from '../../auth'
+import { tokenGetAsync, TokenModel } from '../../auth'
import { CountryLookup } from '../country-lookup.model'
import { EditNameRequest } from '../edit-name-request.model'
import { ModifyTracksRequest } from '../modify-tracks.request'
import { ModifyMemberEmailPreferencesRequest } from '../modify-user-email-preferences.model'
-import { ModifyUserMFARequest, ModifyUserMFAResponse } from '../modify-user-mfa.model'
import { UpdateProfileRequest, UserPhotoUpdateResponse } from '../modify-user-profile.model'
import { ModifyUserPropertyResponse } from '../modify-user-role.model'
import { UserEmailPreferences } from '../user-email-preference.model'
@@ -20,7 +19,6 @@ import {
getCountryLookup,
modifyTracks,
updateMemberEmailPreferences,
- updateMemberMFA,
updateMemberPassword,
updateMemberPhoto,
updateMemberProfile,
@@ -40,13 +38,10 @@ export async function getLoggedInAsync(handle?: string): Promise = profileStoreGet(safeHandle)
- const dicePromise: Promise = userGetDiceStatusAsync(token.userId)
-
- const [profileResult, diceEnabled]: [UserProfile, boolean] = await Promise.all([profilePromise, dicePromise])
+ const profileResult: UserProfile = await profileStoreGet(safeHandle)
// make the changes we need based on the token
- const output: UserProfile = profileFactoryCreate(profileResult, token, diceEnabled)
+ const output: UserProfile = profileFactoryCreate(profileResult, token)
return output
}
@@ -107,13 +102,6 @@ export async function updateMemberEmailPreferencesAsync(
return updateMemberEmailPreferences(email, emailPreferences)
}
-export async function updateMemberMFAStatusAsync(
- userId: number,
- payload: ModifyUserMFARequest,
-): Promise {
- return updateMemberMFA(userId, payload)
-}
-
export async function updateMemberPasswordAsync(
userId: number,
currentPassword: string,
diff --git a/src/libs/core/lib/profile/user-profile.model.ts b/src/libs/core/lib/profile/user-profile.model.ts
index 03d863bfd..1e263d2d0 100644
--- a/src/libs/core/lib/profile/user-profile.model.ts
+++ b/src/libs/core/lib/profile/user-profile.model.ts
@@ -20,7 +20,6 @@ export interface UserProfile {
competitionCountryCode: string
createdAt: number
description: string
- diceEnabled: boolean
email: string
firstName: string
handle: string