diff --git a/client/admin/cloud/ConnectToCloudSection.js b/client/admin/cloud/ConnectToCloudSection.js index 620df48233fc4..3ed2a51b5ca63 100644 --- a/client/admin/cloud/ConnectToCloudSection.js +++ b/client/admin/cloud/ConnectToCloudSection.js @@ -1,10 +1,11 @@ -import { Box, Button, ButtonGroup, Throbber } from '@rocket.chat/fuselage'; +import { Box, Button, ButtonGroup, Throbber, Callout } from '@rocket.chat/fuselage'; import { useSafely } from '@rocket.chat/fuselage-hooks'; import React, { useState } from 'react'; import Subtitle from '../../components/basic/Subtitle'; import { useTranslation } from '../../contexts/TranslationContext'; import { useMethod } from '../../contexts/ServerContext'; +import { useSetting } from '../../contexts/SettingsContext'; import { useToastMessageDispatch } from '../../contexts/ToastMessagesContext'; function ConnectToCloudSection({ @@ -18,6 +19,7 @@ function ConnectToCloudSection({ const registerWorkspace = useMethod('cloud:registerWorkspace'); const syncWorkspace = useMethod('cloud:syncWorkspace'); + const hasAcceptedTerms = useSetting('Cloud_Service_Agree_PrivacyTerms'); const handleRegisterButtonClick = async () => { setConnecting(true); @@ -50,10 +52,15 @@ function ConnectToCloudSection({

{t('Cloud_registration_required_description')}

- + {!hasAcceptedTerms && + + {t('Cloud_Service_Agree_PrivacyTerms_Login_Disabled_Warning')} + + } ; } diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index d67614ef3b0a9..aef424a52dbfe 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -791,6 +791,7 @@ "Cloud_error_code": "Code: __errorCode__", "Cloud_status_page_description": "If a particular Cloud Service is having issues you can check for known issues on our status page at", "Cloud_Service_Agree_PrivacyTerms": "Cloud Service Privacy Terms Agreement", + "Cloud_Service_Agree_PrivacyTerms_Login_Disabled_Warning": "You should accept the cloud privacy terms (Setup Wizard > Cloud Info > Cloud Service Privacy Terms Agreement) to connect to your cloud workspace", "Cloud_Service_Agree_PrivacyTerms_Description": "I agree with the Terms & Privacy Policy", "Cloud_token_instructions": "To Register your workspace go to Cloud Console. Login or Create an account and click register self-managed. Paste the token provided below", "Cloud_troubleshooting": "Troubleshooting",