The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/views/account/security/AccountSecurityRoute.tsx

20 lines
635 B

import { useSetting } from '@rocket.chat/ui-contexts';
import type { ReactElement } from 'react';
import React from 'react';
import NotAuthorizedPage from '../../notAuthorized/NotAuthorizedPage';
import AccountSecurityPage from './AccountSecurityPage';
const AccountSecurityRoute = (): ReactElement => {
const isTwoFactorEnabled = useSetting('Accounts_TwoFactorAuthentication_Enabled');
const isE2EEnabled = useSetting('E2E_Enable');
const canViewSecurity = isTwoFactorEnabled || isE2EEnabled;
if (!canViewSecurity) {
return <NotAuthorizedPage />;
}
return <AccountSecurityPage />;
};
export default AccountSecurityRoute;