From 4118775a4975e8ec6417f7d6844648511b293739 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Fri, 16 Feb 2024 13:07:52 +0000 Subject: [PATCH] Merge pull request #17167 from overleaf/jpa-hide-writefull-anon [web] hide Writefull promotion for non-logged-in users GitOrigin-RevId: 945b0f3da4b3bbd64e71e10f40ab6f8320efb1cd --- .../app/src/Features/Project/ProjectController.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 67996be105..2b55d500ee 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -600,7 +600,18 @@ const ProjectController = { SplitTestHandler.getAssignment(req, res, 'ide-page', cb) }, writefullIntegrationAssignment(cb) { - SplitTestHandler.getAssignment(req, res, 'writefull-integration', cb) + if (anonymous) { + // Disable allocation to split test for non-logged-in users. + // The in-editor promotion is only relevant for logged-in users. + cb() + } else { + SplitTestHandler.getAssignment( + req, + res, + 'writefull-integration', + cb + ) + } }, compileLogEventsAssignment(cb) { SplitTestHandler.getAssignment(req, res, 'compile-log-events', cb)