mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #18970 from overleaf/msm-clean-features-templates
[web] Cleanup `features.templates` GitOrigin-RevId: 7c9f7bc827700e4255a5ba8a46de70318afdaae4
This commit is contained in:
parent
8d2b006d60
commit
1697087425
8 changed files with 12 additions and 12 deletions
|
@ -288,7 +288,6 @@ const settings = {
|
||||||
compileTimeout: parseIntOrFail(process.env.COMPILE_TIMEOUT || 180),
|
compileTimeout: parseIntOrFail(process.env.COMPILE_TIMEOUT || 180),
|
||||||
compileGroup: 'standard',
|
compileGroup: 'standard',
|
||||||
trackChanges: true,
|
trackChanges: true,
|
||||||
templates: true,
|
|
||||||
references: true,
|
references: true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,6 @@ const UserSchema = new Schema(
|
||||||
type: String,
|
type: String,
|
||||||
default: Settings.defaultFeatures.compileGroup,
|
default: Settings.defaultFeatures.compileGroup,
|
||||||
},
|
},
|
||||||
templates: { type: Boolean, default: Settings.defaultFeatures.templates },
|
|
||||||
references: {
|
references: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: Settings.defaultFeatures.references,
|
default: Settings.defaultFeatures.references,
|
||||||
|
|
|
@ -383,7 +383,6 @@ module.exports = {
|
||||||
compileTimeout: 180,
|
compileTimeout: 180,
|
||||||
compileGroup: 'standard',
|
compileGroup: 'standard',
|
||||||
references: true,
|
references: true,
|
||||||
templates: true,
|
|
||||||
trackChanges: true,
|
trackChanges: true,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
const { batchedUpdate } = require('../scripts/helpers/batchedUpdate')
|
||||||
|
exports.tags = ['server-ce', 'server-pro', 'saas']
|
||||||
|
|
||||||
|
exports.migrate = async () => {
|
||||||
|
await batchedUpdate(
|
||||||
|
'users',
|
||||||
|
{ 'features.templates': { $exists: true } },
|
||||||
|
{ $unset: { 'features.templates': true } }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.rollback = async () => {}
|
|
@ -386,7 +386,6 @@ describe('ServerCEScripts', function () {
|
||||||
compileTimeout: 180,
|
compileTimeout: 180,
|
||||||
compileGroup: 'standard',
|
compileGroup: 'standard',
|
||||||
references: true,
|
references: true,
|
||||||
templates: true,
|
|
||||||
trackChanges: true,
|
trackChanges: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,6 @@ module.exports = {
|
||||||
versioning: false,
|
versioning: false,
|
||||||
github: true,
|
github: true,
|
||||||
gitBridge: true,
|
gitBridge: true,
|
||||||
templates: false,
|
|
||||||
references: false,
|
references: false,
|
||||||
referencesSearch: false,
|
referencesSearch: false,
|
||||||
mendeley: true,
|
mendeley: true,
|
||||||
|
@ -121,7 +120,6 @@ module.exports = {
|
||||||
versioning: false,
|
versioning: false,
|
||||||
github: false,
|
github: false,
|
||||||
gitBridge: false,
|
gitBridge: false,
|
||||||
templates: false,
|
|
||||||
references: false,
|
references: false,
|
||||||
referencesSearch: false,
|
referencesSearch: false,
|
||||||
mendeley: false,
|
mendeley: false,
|
||||||
|
@ -137,7 +135,6 @@ module.exports = {
|
||||||
versioning: true,
|
versioning: true,
|
||||||
github: true,
|
github: true,
|
||||||
gitBridge: true,
|
gitBridge: true,
|
||||||
templates: true,
|
|
||||||
references: true,
|
references: true,
|
||||||
referencesSearch: true,
|
referencesSearch: true,
|
||||||
mendeley: true,
|
mendeley: true,
|
||||||
|
@ -153,7 +150,6 @@ module.exports = {
|
||||||
versioning: true,
|
versioning: true,
|
||||||
github: true,
|
github: true,
|
||||||
gitBridge: true,
|
gitBridge: true,
|
||||||
templates: true,
|
|
||||||
references: true,
|
references: true,
|
||||||
referencesSearch: true,
|
referencesSearch: true,
|
||||||
mendeley: true,
|
mendeley: true,
|
||||||
|
|
|
@ -64,7 +64,6 @@ describe('ProjectFeatures', function () {
|
||||||
(error, response, body) => {
|
(error, response, body) => {
|
||||||
expect(body.project.features.compileGroup).to.equal('priority')
|
expect(body.project.features.compileGroup).to.equal('priority')
|
||||||
expect(body.project.features.versioning).to.equal(true)
|
expect(body.project.features.versioning).to.equal(true)
|
||||||
expect(body.project.features.templates).to.equal(true)
|
|
||||||
expect(body.project.features.dropbox).to.equal(true)
|
expect(body.project.features.dropbox).to.equal(true)
|
||||||
return done()
|
return done()
|
||||||
}
|
}
|
||||||
|
@ -87,7 +86,6 @@ describe('ProjectFeatures', function () {
|
||||||
(error, response, body) => {
|
(error, response, body) => {
|
||||||
expect(body.project.features.compileGroup).to.equal('standard')
|
expect(body.project.features.compileGroup).to.equal('standard')
|
||||||
expect(body.project.features.versioning).to.equal(false)
|
expect(body.project.features.versioning).to.equal(false)
|
||||||
expect(body.project.features.templates).to.equal(false)
|
|
||||||
expect(body.project.features.dropbox).to.equal(false)
|
expect(body.project.features.dropbox).to.equal(false)
|
||||||
return done()
|
return done()
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,7 +543,6 @@ class User {
|
||||||
dropbox: true,
|
dropbox: true,
|
||||||
compileTimeout: 60,
|
compileTimeout: 60,
|
||||||
compileGroup: 'priority',
|
compileGroup: 'priority',
|
||||||
templates: true,
|
|
||||||
references: true,
|
references: true,
|
||||||
trackChanges: true,
|
trackChanges: true,
|
||||||
trackChangesVisible: true,
|
trackChangesVisible: true,
|
||||||
|
@ -558,7 +557,6 @@ class User {
|
||||||
dropbox: false,
|
dropbox: false,
|
||||||
compileTimeout: 60,
|
compileTimeout: 60,
|
||||||
compileGroup: 'standard',
|
compileGroup: 'standard',
|
||||||
templates: false,
|
|
||||||
references: false,
|
references: false,
|
||||||
trackChanges: false,
|
trackChanges: false,
|
||||||
trackChangesVisible: false,
|
trackChangesVisible: false,
|
||||||
|
|
Loading…
Reference in a new issue