diff --git a/web/navigation-panels/settings-switcher.react.js b/web/navigation-panels/settings-switcher.react.js --- a/web/navigation-panels/settings-switcher.react.js +++ b/web/navigation-panels/settings-switcher.react.js @@ -3,6 +3,7 @@ import * as React from 'react'; import { useDispatch } from 'lib/utils/redux-utils.js'; +import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js'; import NavigationPanel from './navigation-panel.react.js'; import css from './settings-switcher.css'; @@ -66,14 +67,20 @@ }, [dispatch], ); - const dangerZoneNavigationItem = React.useMemo( - () => ( + const dangerZoneNavigationItem = React.useMemo(() => { + // Once we're using the identity service for auth, a user may only delete + // their Comm account using their primary device. Their primary device + // cannot be a web device at this time, so we hide the Danger Zone from web + // users. + if (usingCommServicesAccessToken) { + return null; + } + return (

Danger Zone

- ), - [onClickDangerZone], - ); + ); + }, [onClickDangerZone]); return ( diff --git a/web/settings/danger-zone.react.js b/web/settings/danger-zone.react.js --- a/web/settings/danger-zone.react.js +++ b/web/settings/danger-zone.react.js @@ -3,6 +3,7 @@ import * as React from 'react'; import { useModalContext } from 'lib/components/modal-provider.react.js'; +import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js'; import AccountDeleteModal from './account-delete-modal.react.js'; import css from './danger-zone.css'; @@ -15,6 +16,13 @@ [pushModal], ); + // Once we're using the identity service for auth, a user may only delete + // their Comm account using their primary device. Their primary device cannot + // be a web device at this time, so we hide the Danger Zone from web users. + if (usingCommServicesAccessToken) { + return null; + } + return (