Merge pull request #18970 from overleaf/msm-clean-features-templates

[web] Cleanup `features.templates`

GitOrigin-RevId: 7c9f7bc827700e4255a5ba8a46de70318afdaae4
This commit is contained in:
Miguel Serrano 2024-06-24 12:46:01 +02:00 committed by Copybot
parent 8d2b006d60
commit 1697087425
8 changed files with 12 additions and 12 deletions

View file

@ -288,7 +288,6 @@ const settings = {
compileTimeout: parseIntOrFail(process.env.COMPILE_TIMEOUT || 180),
compileGroup: 'standard',
trackChanges: true,
templates: true,
references: true,
},
}

View file

@ -107,7 +107,6 @@ const UserSchema = new Schema(
type: String,
default: Settings.defaultFeatures.compileGroup,
},
templates: { type: Boolean, default: Settings.defaultFeatures.templates },
references: {
type: Boolean,
default: Settings.defaultFeatures.references,

View file

@ -383,7 +383,6 @@ module.exports = {
compileTimeout: 180,
compileGroup: 'standard',
references: true,
templates: true,
trackChanges: true,
}),

View file

@ -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 () => {}

View file

@ -386,7 +386,6 @@ describe('ServerCEScripts', function () {
compileTimeout: 180,
compileGroup: 'standard',
references: true,
templates: true,
trackChanges: true,
}

View file

@ -105,7 +105,6 @@ module.exports = {
versioning: false,
github: true,
gitBridge: true,
templates: false,
references: false,
referencesSearch: false,
mendeley: true,
@ -121,7 +120,6 @@ module.exports = {
versioning: false,
github: false,
gitBridge: false,
templates: false,
references: false,
referencesSearch: false,
mendeley: false,
@ -137,7 +135,6 @@ module.exports = {
versioning: true,
github: true,
gitBridge: true,
templates: true,
references: true,
referencesSearch: true,
mendeley: true,
@ -153,7 +150,6 @@ module.exports = {
versioning: true,
github: true,
gitBridge: true,
templates: true,
references: true,
referencesSearch: true,
mendeley: true,

View file

@ -64,7 +64,6 @@ describe('ProjectFeatures', function () {
(error, response, body) => {
expect(body.project.features.compileGroup).to.equal('priority')
expect(body.project.features.versioning).to.equal(true)
expect(body.project.features.templates).to.equal(true)
expect(body.project.features.dropbox).to.equal(true)
return done()
}
@ -87,7 +86,6 @@ describe('ProjectFeatures', function () {
(error, response, body) => {
expect(body.project.features.compileGroup).to.equal('standard')
expect(body.project.features.versioning).to.equal(false)
expect(body.project.features.templates).to.equal(false)
expect(body.project.features.dropbox).to.equal(false)
return done()
}

View file

@ -543,7 +543,6 @@ class User {
dropbox: true,
compileTimeout: 60,
compileGroup: 'priority',
templates: true,
references: true,
trackChanges: true,
trackChangesVisible: true,
@ -558,7 +557,6 @@ class User {
dropbox: false,
compileTimeout: 60,
compileGroup: 'standard',
templates: false,
references: false,
trackChanges: false,
trackChangesVisible: false,