diff --git a/ui/page/help/index.js b/ui/page/help/index.js index 3e9785f4b..927762856 100644 --- a/ui/page/help/index.js +++ b/ui/page/help/index.js @@ -2,9 +2,11 @@ import HelpPage from './view'; import { connect } from 'react-redux'; import { doOpenModal } from 'redux/actions/app'; import { selectHomepageAnnouncement } from 'redux/selectors/settings'; +import { selectUser } from 'redux/selectors/user'; const select = (state) => ({ announcement: selectHomepageAnnouncement(state), + user: selectUser(state), }); const perform = { diff --git a/ui/page/help/view.jsx b/ui/page/help/view.jsx index 9f35288cf..6a5508da5 100644 --- a/ui/page/help/view.jsx +++ b/ui/page/help/view.jsx @@ -6,16 +6,23 @@ import Button from 'component/button'; import Page from 'component/page'; import Card from 'component/common/card'; import I18nMessage from 'component/i18nMessage'; +import { getAuthToken } from 'util/saved-passwords'; +import CopyableText from 'component/copyableText'; import * as MODALS from 'constants/modal_types'; type Props = { announcement: string, doOpenModal: (string, ?{}) => void, + user: any, }; export default function HelpPage(props: Props) { - const { announcement, doOpenModal } = props; + const { announcement, doOpenModal, user } = props; + + const canViewToken = process.env.ENABLE_WIP_FEATURES || (user && user.internal_feature); + + const authToken = canViewToken && getAuthToken(); return ( @@ -94,6 +101,25 @@ export default function HelpPage(props: Props) { } /> + + {canViewToken && authToken && ( + + + + } + /> + )} ); }