Co-authored-by: Eric Mc Sween
<5454374+emcsween@users.noreply.github.com>
Borrowed from a different commit in em-zod
GitOrigin-RevId: bb6ba6f3db35964e95d0b7f44454c4aa19d15b28
* add option to remove link-sharing from backend
* restrict make link-sharing in the frontend based on capability
* extend e2e project-sharing tests to cover OVERLEAF_DISABLE_LINK_SHARING=true
* throw an error when link sharing is disabled in TokenAccessHandler
* throw errors when attempting to add users to projects with link sharing disabled
* Update server-ce/test/project-sharing.spec.ts
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* add tests for existing access when link sharing is disabled
* update tests to specify access restrictions for read-only and read-write link shared projects
* [web] block access to legacy public project with link-sharing disabled
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 5f194dbcb790e973e427c58a3a4a738a5dd74cb4
* Rename `suppressGoogleAnalytics` to `suppressAnalytics`
* Add Propensity script
* Add LinkedIn Insight Tag script
* Version the cookie to prevent adding unconsented tracking
* Move tracking loaders to Typescript, insert them in foot_scripts.pug
* Show the cookie-banner when tracking other than GA is set
* Revert `oa` cookie versioning
* Remove `async` from propensity script
* Use shared tracking loader for Hotjar, LinkedIn, and Propensity
* Reusable `insertScript`
* Remove tracking-linkedin
* Test the scripts by adding fake ids
* Revert "Test the scripts by adding fake ids"
This reverts commit 50759bb6b40fd2684d1b967d83dd71e8517c3de9.
GitOrigin-RevId: 2a7b36bfc70ac1fc983f837dd4693a19a385cbc6
* Improve FileTooLargeError handling in FileWriter.js
* handle errors on passThrough stream
* unlink files on error
* fail `writeUrlToDisk` if content-length header is too large
With Node 22, the test `Open In Overleaf - when POSTing a snip_uri for a file that is too large` fails.
I initially tried replacing it with a check of the `content-length` header. But then I managed to make the old test pass by adding a handler (`passThrough.on('error', ...)`)
* Unlink files asynchronously, add stream destroys on error
* Remove eslint disables
* Remove `stream.on('error', ...)` and `passThrough.on('error', ...)`
* Revert `Content-Length` check
* Re-add `stream.on('error', errorHandler)`; Remove it on 'response'
* Only report unlink errors there is an error(!!) that's not ENOENT
GitOrigin-RevId: fefe49519ec6f54df5eef69a2c2a75518f9d3748
* [web] refactor startup sequence
The primary objective here is to call loadGlobalBlobs() only once.
But to get there, we need to reorder things and add extra try/catch
sections to ensure we are not letting the global uncaughtException
handler catch startup errors.
Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
* [web] add metrics for startup steps
Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: c73edea02516e919d55b896588dcd1862835fedf
* [misc] fix logger.error(err) calls
The signature is "logger.error({ err }, 'MESSAGE')".
* [project-history] remove duplicate logger.err calls in health check
The call-site is already logging any errors. Also, the logger.err call
signature was not quite right.
* [web] log userId when removeDropbox/removeGithub hook fails
* [misc] fix logger.warn(err) calls
The signature is "logger.warn({ err }, 'MESSAGE')".
* [misc] fix logger.error(OError.tag(err)) calls
* [web] make eslint happy
GitOrigin-RevId: 7f528113a3f7e9f6293b7d2d45adc079380325bb
Always apply overall dark theme with IEEE-branded editor and tear down ieee-stylesheet feature flag, second attempt
GitOrigin-RevId: 311d125a77a46ee3f34769064005b6edea7ce013
Revert "Always apply overall dark theme with IEEE-branded editor and tear down ieee-stylesheet feature flag"
GitOrigin-RevId: 223b4816b02ba96212ea7e779e16770cd4f16949
Always apply overall dark theme with IEEE-branded editor and tear down ieee-stylesheet feature flag
GitOrigin-RevId: 80d10a911f3a188867db9b825f3ae8413f555b64
Proposal: Add promise interface for attaching module hooks and switch methods to be "Promise-first"
GitOrigin-RevId: 6740c18b75ebca79c24aa8b9867c8127b381b695