mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #29821 from overleaf/dp-editor-redesign-opt-out
Prepare editor redesign for opt-out phase GitOrigin-RevId: 5831970ff27e5c20f22c68b83471b6b832c2b2b4
This commit is contained in:
@@ -22,6 +22,7 @@ import { expressify } from '@overleaf/promise-utils'
|
||||
import { acceptsJson } from '../../infrastructure/RequestContentTypeDetection.mjs'
|
||||
import Modules from '../../infrastructure/Modules.mjs'
|
||||
import OneTimeTokenHandler from '../Security/OneTimeTokenHandler.mjs'
|
||||
import SplitTestHandler from '../SplitTests/SplitTestHandler.mjs'
|
||||
|
||||
async function _sendSecurityAlertClearedSessions(user) {
|
||||
const emailOptions = {
|
||||
@@ -405,7 +406,18 @@ async function updateUserSettings(req, res, next) {
|
||||
user.ace.referencesSearchMode = mode
|
||||
}
|
||||
if (body.enableNewEditor != null) {
|
||||
user.ace.enableNewEditor = Boolean(body.enableNewEditor)
|
||||
const assignment = await SplitTestHandler.promises.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'editor-redesign-opt-out'
|
||||
)
|
||||
const isOptOutStageEnabled = assignment.variant === 'enabled'
|
||||
|
||||
if (isOptOutStageEnabled) {
|
||||
user.ace.enableNewEditorStageFour = Boolean(body.enableNewEditor)
|
||||
} else {
|
||||
user.ace.enableNewEditor = Boolean(body.enableNewEditor)
|
||||
}
|
||||
}
|
||||
if (body.darkModePdf != null) {
|
||||
user.ace.darkModePdf = Boolean(body.darkModePdf)
|
||||
|
||||
Reference in New Issue
Block a user