From d6e8c5e2a4f79efd926357334a62ed460c44763a Mon Sep 17 00:00:00 2001 From: Moncef Abboud Date: Mon, 2 Oct 2023 11:54:44 +0200 Subject: [PATCH] feat: implement SHOW_REGISTRATION_LINKS setting --- src/common-components/EnterpriseSSO.jsx | 3 ++- src/logistration/Logistration.jsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common-components/EnterpriseSSO.jsx b/src/common-components/EnterpriseSSO.jsx index 4bfc5ae33b..faacdb29e3 100644 --- a/src/common-components/EnterpriseSSO.jsx +++ b/src/common-components/EnterpriseSSO.jsx @@ -19,7 +19,8 @@ import { LOGIN_PAGE, SUPPORTED_ICON_CLASSES } from '../data/constants'; const EnterpriseSSO = (props) => { const { formatMessage } = useIntl(); const tpaProvider = props.provider; - const disablePublicAccountCreation = getConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false; + const disablePublicAccountCreation = getConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false + || getConfig().SHOW_REGISTRATION_LINKS === false; const handleSubmit = (e, url) => { e.preventDefault(); diff --git a/src/logistration/Logistration.jsx b/src/logistration/Logistration.jsx index 7c6d77ff0b..448ac3d7e5 100644 --- a/src/logistration/Logistration.jsx +++ b/src/logistration/Logistration.jsx @@ -38,7 +38,8 @@ const Logistration = (props) => { const [institutionLogin, setInstitutionLogin] = useState(false); const [key, setKey] = useState(''); const navigate = useNavigate(); - const disablePublicAccountCreation = getConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false; + const disablePublicAccountCreation = getConfig().ALLOW_PUBLIC_ACCOUNT_CREATION === false + || getConfig().SHOW_REGISTRATION_LINKS === false; useEffect(() => { const authService = getAuthService();