mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
[web] Enable history ranges support behind feature flag (#18429)
GitOrigin-RevId: 2f3b2352d2c157248da350eaf7b1784a605ebf20
This commit is contained in:
parent
f14fdc7b7c
commit
d95910fc71
2 changed files with 14 additions and 1 deletions
|
@ -15,6 +15,7 @@ const { callbackify } = require('util')
|
|||
const _ = require('lodash')
|
||||
const AnalyticsManager = require('../Analytics/AnalyticsManager')
|
||||
const TpdsUpdateSender = require('../ThirdPartyDataStore/TpdsUpdateSender')
|
||||
const SplitTestHandler = require('../SplitTests/SplitTestHandler')
|
||||
|
||||
const MONTH_NAMES = [
|
||||
'January',
|
||||
|
@ -180,8 +181,19 @@ async function _createBlankProject(
|
|||
}
|
||||
}
|
||||
project.rootFolder[0] = rootFolder
|
||||
const user = await User.findById(ownerId, 'ace.spellCheckLanguage')
|
||||
const user = await User.findById(ownerId, {
|
||||
'ace.spellCheckLanguage': 1,
|
||||
_id: 1,
|
||||
})
|
||||
project.spellCheckLanguage = user.ace.spellCheckLanguage
|
||||
const historyRangesSupportAssignment =
|
||||
await SplitTestHandler.promises.getAssignmentForUser(
|
||||
user._id,
|
||||
'history-ranges-support'
|
||||
)
|
||||
if (historyRangesSupportAssignment.variant === 'enabled') {
|
||||
project.overleaf.history.rangesSupportEnabled = true
|
||||
}
|
||||
await project.save()
|
||||
if (!skipCreatingInTPDS) {
|
||||
await TpdsUpdateSender.promises.createProject({
|
||||
|
|
|
@ -94,6 +94,7 @@ const ProjectSchema = new Schema(
|
|||
upgradedAt: { type: Date },
|
||||
allowDowngrade: { type: Boolean },
|
||||
zipFileArchivedInProject: { type: Boolean },
|
||||
rangesSupportEnabled: { type: Boolean },
|
||||
},
|
||||
},
|
||||
collabratecUsers: [
|
||||
|
|
Loading…
Reference in a new issue