mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-19 04:13:54 +00:00
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
This commit is contained in:
parent
794e6e146d
commit
38a2b9ee53
1 changed files with 5 additions and 2 deletions
|
@ -270,7 +270,7 @@ module.exports = ProjectController =
|
||||||
project: (cb)->
|
project: (cb)->
|
||||||
ProjectGetter.getProject(
|
ProjectGetter.getProject(
|
||||||
project_id,
|
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
|
cb
|
||||||
)
|
)
|
||||||
user: (cb)->
|
user: (cb)->
|
||||||
|
@ -323,6 +323,9 @@ module.exports = ProjectController =
|
||||||
if subscription? and subscription.freeTrial? and subscription.freeTrial.expiresAt?
|
if subscription? and subscription.freeTrial? and subscription.freeTrial.expiresAt?
|
||||||
allowedFreeTrial = !!subscription.freeTrial.allowed || true
|
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"
|
logger.log project_id:project_id, "rendering editor page"
|
||||||
res.render 'project/editor',
|
res.render 'project/editor',
|
||||||
title: project.name
|
title: project.name
|
||||||
|
@ -370,7 +373,7 @@ module.exports = ProjectController =
|
||||||
brandVariation: brandVariation
|
brandVariation: brandVariation
|
||||||
allowedImageNames: Settings.allowedImageNames || []
|
allowedImageNames: Settings.allowedImageNames || []
|
||||||
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl
|
gitBridgePublicBaseUrl: Settings.gitBridgePublicBaseUrl
|
||||||
showGitBridge: req.query?.gitbridge == 'true' || user.isAdmin
|
showGitBridge: showGitBridge
|
||||||
timer.done()
|
timer.done()
|
||||||
|
|
||||||
_buildProjectList: (allProjects, v1Projects = [])->
|
_buildProjectList: (allProjects, v1Projects = [])->
|
||||||
|
|
Loading…
Reference in a new issue