From 38a2b9ee53fd9682ae4f853ec9d1a278480b9d4d Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 23 Nov 2018 15:00:44 +0100 Subject: [PATCH] Merge pull request #1181 from sharelatex/ja-git-bridge-beta Open up v2 git bridge to beta users but only with v2 only projects GitOrigin-RevId: 0895a4636ca9dbffcb112c2b1459773303ecc2cd --- .../app/coffee/Features/Project/ProjectController.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/Project/ProjectController.coffee b/services/web/app/coffee/Features/Project/ProjectController.coffee index 618fc7c0b4..b3b8e9a6d4 100644 --- a/services/web/app/coffee/Features/Project/ProjectController.coffee +++ b/services/web/app/coffee/Features/Project/ProjectController.coffee @@ -270,7 +270,7 @@ module.exports = ProjectController = project: (cb)-> ProjectGetter.getProject( project_id, - { name: 1, lastUpdated: 1, track_changes: 1, owner_ref: 1, brandVariationId: 1, 'overleaf.history.display': 1 }, + { name: 1, lastUpdated: 1, track_changes: 1, owner_ref: 1, brandVariationId: 1, overleaf: 1 }, cb ) user: (cb)-> @@ -323,6 +323,9 @@ module.exports = ProjectController = if subscription? and subscription.freeTrial? and subscription.freeTrial.expiresAt? allowedFreeTrial = !!subscription.freeTrial.allowed || true + showGitBridge = + user.betaProgram && !project.overleaf?.id? # don't support v1 projects yet + logger.log project_id:project_id, "rendering editor page" res.render 'project/editor', title: project.name @@ -370,7 +373,7 @@ module.exports = ProjectController = brandVariation: brandVariation allowedImageNames: Settings.allowedImageNames || [] gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl - showGitBridge: req.query?.gitbridge == 'true' || user.isAdmin + showGitBridge: showGitBridge timer.done() _buildProjectList: (allProjects, v1Projects = [])->