From af916712b3f4fbe91f24f134a6fe96d6ec5d366a Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Fri, 11 Oct 2024 11:13:16 -0400 Subject: [PATCH] Merge pull request #20848 from overleaf/jdt-hide-wf-in-settings-from-no-ai hiding wf in settings from users with a blocking policy GitOrigin-RevId: 8d640a53d7bbbcd809604f07bbd4bb0ab6939c03 --- .../js/features/settings/components/linking-section.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/settings/components/linking-section.tsx b/services/web/frontend/js/features/settings/components/linking-section.tsx index c899dfa503..38d2dd8e0e 100644 --- a/services/web/frontend/js/features/settings/components/linking-section.tsx +++ b/services/web/frontend/js/features/settings/components/linking-section.tsx @@ -22,6 +22,7 @@ function LinkingSection() { const { t } = useTranslation() const { subscriptions } = useSSOContext() const ssoErrorMessage = getMeta('ol-ssoErrorMessage') + const cannotUseAi = getMeta('ol-cannot-use-ai') const projectSyncSuccessMessage = getMeta('ol-projectSyncSuccessMessage') // hide linking widgets in CI @@ -47,7 +48,9 @@ function LinkingSection() { oauth2ServerComponents ) - const haslangFeedbackLinkingWidgets = langFeedbackLinkingWidgets.length + // since we only have Writefull here currently, we should hide the whole section if they cant use ai + const haslangFeedbackLinkingWidgets = + langFeedbackLinkingWidgets.length && !cannotUseAi const hasIntegrationLinkingSection = renderSyncSection && allIntegrationLinkingWidgets.length const hasReferencesLinkingSection = referenceLinkingWidgets.length