import { IdentityProvider } from "@prisma/client"; import React from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import SAMLConfiguration from "@ee/components/saml/Configuration"; import { identityProviderNameMap } from "@lib/auth"; import SettingsShell from "@components/SettingsShell"; import ChangePasswordSection from "@components/security/ChangePasswordSection"; import DisableUserImpersonation from "@components/security/DisableUserImpersonation"; import TwoFactorAuthSection from "@components/security/TwoFactorAuthSection"; export default function Security() { const user = trpc.useQuery(["viewer.me"]).data; const { t } = useLocale(); return ( <> {user && user.identityProvider !== IdentityProvider.CAL ? ( <>

{t("account_managed_by_identity_provider", { provider: identityProviderNameMap[user.identityProvider], })}

{t("account_managed_by_identity_provider_description", { provider: identityProviderNameMap[user.identityProvider], })}

) : (
)}
); }