Merge pull request #20089 from overleaf/tm-link-sharing-enforcement-in-frontend

Make ol-linkSharingEnforcement available to the frontend

GitOrigin-RevId: b64ce29f528c5b02c0cee400c73dc364d8e6da47
This commit is contained in:
Thomas 2024-08-26 15:00:49 +02:00 committed by Copybot
parent ed981ea554
commit 95aa79e95d
3 changed files with 5 additions and 1 deletions

View file

@ -589,6 +589,7 @@ const _ProjectController = {
projectId: project._id, projectId: project._id,
// temporary link sharing segmentation: // temporary link sharing segmentation:
linkSharingWarning: linkSharingChanges?.variant, linkSharingWarning: linkSharingChanges?.variant,
linkSharingEnforcement: linkSharingEnforcement?.variant,
namedEditors, namedEditors,
pendingEditors, pendingEditors,
tokenEditors: project.tokenAccessReadAndWrite_refs?.length || 0, tokenEditors: project.tokenAccessReadAndWrite_refs?.length || 0,
@ -743,7 +744,8 @@ const _ProjectController = {
useOpenTelemetry: Settings.useOpenTelemetryClient, useOpenTelemetry: Settings.useOpenTelemetryClient,
hasTrackChangesFeature: Features.hasFeature('track-changes'), hasTrackChangesFeature: Features.hasFeature('track-changes'),
projectTags, projectTags,
linkSharingWarning: linkSharingChanges.variant === 'active', linkSharingWarning: linkSharingChanges?.variant === 'active',
linkSharingEnforcement: linkSharingEnforcement?.variant === 'active',
usedLatex: usedLatex:
// only use the usedLatex value if the split test is enabled // only use the usedLatex value if the split test is enabled
splitTestAssignments['default-visual-for-beginners']?.variant === splitTestAssignments['default-visual-for-beginners']?.variant ===

View file

@ -35,6 +35,7 @@ meta(name="ol-hasTrackChangesFeature", data-type="boolean" content=hasTrackChang
meta(name="ol-inactiveTutorials", data-type="json" content=user.inactiveTutorials) meta(name="ol-inactiveTutorials", data-type="json" content=user.inactiveTutorials)
meta(name="ol-projectTags" data-type="json" content=projectTags) meta(name="ol-projectTags" data-type="json" content=projectTags)
meta(name="ol-linkSharingWarning" data-type="boolean" content=linkSharingWarning) meta(name="ol-linkSharingWarning" data-type="boolean" content=linkSharingWarning)
meta(name="ol-linkSharingEnforcement" data-type="boolean" content=linkSharingEnforcement)
meta(name="ol-usedLatex" data-type="string" content=usedLatex) meta(name="ol-usedLatex" data-type="string" content=usedLatex)
meta(name="ol-ro-mirror-on-client-no-local-storage" data-type="boolean" content=roMirrorOnClientNoLocalStorage) meta(name="ol-ro-mirror-on-client-no-local-storage" data-type="boolean" content=roMirrorOnClientNoLocalStorage)
meta(name="ol-isSaas" data-type="boolean" content=isSaas) meta(name="ol-isSaas" data-type="boolean" content=isSaas)

View file

@ -123,6 +123,7 @@ export interface Meta {
'ol-languages': SpellCheckLanguage[] 'ol-languages': SpellCheckLanguage[]
'ol-learnedWords': string[] 'ol-learnedWords': string[]
'ol-legacyEditorThemes': string[] 'ol-legacyEditorThemes': string[]
'ol-linkSharingEnforcement': boolean
'ol-linkSharingWarning': boolean 'ol-linkSharingWarning': boolean
'ol-loadingText': string 'ol-loadingText': string
'ol-managedGroupSubscriptions': ManagedGroupSubscription[] 'ol-managedGroupSubscriptions': ManagedGroupSubscription[]