Commit graph

526 commits

Author SHA1 Message Date
Antoine Clausse
436dcc977f Update Node to 22.15.1 (#25785)
GitOrigin-RevId: 52428d2d7e67c3135a1604fa487dd142aa08bf15
2025-05-22 08:07:42 +00:00
Brian Gough
efd55ffe97 Merge pull request #25743 from overleaf/bg-deactivate-projects-script
add deactivate projects script

GitOrigin-RevId: 5acf4b980d8980457930ee488571362da2a8014c
2025-05-21 08:05:25 +00:00
Antoine Clausse
67ab5a749a Update Node to 22.15.0 (#24699)
* Run `bin/update_node 20.18.2 22.15.0`

* Remove expects on `fetchMock.callHistory.done()` to fix tests: are they necessary?

* Set node version to `22.x` in linked-url-proxy

* Increase test timeout to 30s in `github-sync`, Add waiting steps

* Define `navigator.onLine` in tests setup

GitOrigin-RevId: 75eb556e9f51b665e57497a0879b6915d14069ce
2025-05-16 08:06:26 +00:00
Domagoj Kriskovic
b99a81cb25 Fix monthly price if billed annually for AI Assist (#25297)
* Fix monthly price if billed annually for AI Assist

* update script

* show annual price

* fix formatting

GitOrigin-RevId: e50493fa2176e6c8acb476a01a393eb940a3f1a2
2025-05-13 08:06:39 +00:00
Domagoj Kriskovic
c1f3758aa2 Add script to update null references in for readOnly_refs and pendingReviewer_refs (#25417)
* Add script to update null references in for readOnly_refs and pendingReviewer_refs

* update script to only update readOnly_refs

* clean up

* use projectAuditLogEntries to find relevant projects

* use updateOne

GitOrigin-RevId: bbeaa04b837ebb657c802598f0de72879f641bd0
2025-05-13 08:06:23 +00:00
Eric Mc Sween
7ea1b690f2 Configure PKCE support in OAuth clients (#25300)
This flag will control whether or not a particular client is allowed to
use PKCE instead of a client secret when requesting an access token.

GitOrigin-RevId: b9471112a485233308410e0cb7f20e20a613a971
2025-05-09 08:06:04 +00:00
Antoine Clausse
e7329b9660 [web] Remove script remove_emails_with_commas.mjs (#25356)
It ran in prod and updated 112 users

GitOrigin-RevId: 730f6544e7a5bb4d08095b48fb697b5c8e7a08be
2025-05-07 08:08:01 +00:00
Antoine Clausse
e3dd47ba6e [web] Fix date format in emails.createdAt, use new Date() instead of Date.now() (#25322)
GitOrigin-RevId: c94700accb1df902926779c1e6321be63cf65235
2025-05-07 08:07:02 +00:00
Jimmy Domagala-Tang
22ad3a86a9 Merge pull request #25148 from overleaf/jdt-bundle-price-update
Update prices and naming for AI Assist bundle

GitOrigin-RevId: ece300a9d009a9e17594d3c052b33321c9b17f82
2025-05-02 08:06:10 +00:00
Eric Mc Sween
6f05a43f32 Merge pull request #25064 from overleaf/em-oauth-no-secret
Do not require a secret in OAuth configurations

GitOrigin-RevId: 8d67436bc9366ef5991c02e89a81dbbf573196d7
2025-05-02 08:05:52 +00:00
Miguel Serrano
958e05a001 [web] script to update group members via CSV (#24861)
* [web] script to update group members via CSV

GitOrigin-RevId: 973d1bdb1180af008608e14e1ff31af83e47f630
2025-05-01 08:06:27 +00:00
Antoine Clausse
c51d6f46d4 Add script to remove emails with commas, taken from a CSV file (#25107)
* Add script to remove emails with commas and replace them emails to support with encoded former emails

* Enhance RemoveEmailsWithCommasScriptTest to verify unchanged user data

GitOrigin-RevId: 6961995f2a143ac1c53bc2eeb183808a4be7dd02
2025-05-01 08:05:46 +00:00
Jakob Ackermann
f0edc7ba00 [web] update the projects lastUpdated timestamp when changing file-tree (#24867)
* [misc] freeze time before any other unit test setup steps

Freezing it after other work (notably sandboxed-module imports) will
result in flaky tests.

* [web] update the projects lastUpdated timestamp when changing file-tree

GitOrigin-RevId: b82b2ff74dc31886f3c4bd300375117eead6e0cd
2025-04-16 08:05:14 +00:00
Liangjun Song
c60ceaf932 Merge pull request #24466 from overleaf/ls-script-runner
Script runner

GitOrigin-RevId: 4cc7004f05177dba2a2151aa6db7e75fb679d11d
2025-04-14 08:04:37 +00:00
Antoine Clausse
7eecfe9e27 [web] Add another partial fix for fix_malformed_filetree: use _id instead of path to locate data (#24101)
* Fix `fix_malformed_filetree`'s `fixName`

* Fix findUniqueName with missing names in siblings

* Add test showcasing another bug: shifted arrays in filetree folder

* Update `removeNulls` to use `_id`

* Update services/web/app/src/Features/Project/ProjectLocator.js

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

* Add FIXME about file names uniqueness

* Rename `obj` to `project`

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 3ed795ae0621800603395f7b50626ac89c39199d
2025-04-08 08:05:32 +00:00
Brian Gough
0cc244c516 Merge pull request #20022 from overleaf/bg-check-file-tree
add script to check for errors in project file tree

GitOrigin-RevId: da115cbd79e7ca53a0222638a54bbea1b633f709
2025-04-07 08:04:44 +00:00
Domagoj Kriskovic
830d0daa38 Script for removing user enrollment from a subscription (#24627)
* Script for removing user enrollment to a subcription

* Add "release-managed-user"  audit log event for an user id

GitOrigin-RevId: adf2dd97ac82977bcfa07d9a24d1f3c190d095a2
2025-04-03 08:04:54 +00:00
Miguel Serrano
b480903426 Merge pull request #24381 from overleaf/msm-improve-sync-group-subscription-script
[web] Improve group subscription sync + add missing indexes

GitOrigin-RevId: e7cecd9b8a1978a9e13a165d3f646b98ff7e9394
2025-03-26 09:05:04 +00:00
Domagoj Kriskovic
47fb3a644c Script for generating add-on prices (from recurly) (#24051)
* Script for generating addon prices (from recurly)

* addon code as param

GitOrigin-RevId: b1a45a806c29de56a10532398b56468f9732593f
2025-03-24 10:49:15 +00:00
Liangjun Song
e44f892cb0 Merge pull request #24271 from overleaf/ls-script-to-update-manually-billed-users
Scripts to update terms and conditions for manually billed users

GitOrigin-RevId: 5efe43a42c3ed21779c9de698268817e2cbb5249
2025-03-24 10:49:11 +00:00
Jakob Ackermann
7b69d61540 [saas-e2e] initial revision of SaaS E2E tests running in the dev-env (#24311)
* [saas-e2e] initial revision of SaaS E2E tests running in the dev-env

* [v1] make rubocop happy

* [v1] make rubocop happy

* [saas-e2e] more retries for webpack startup check

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>

* [web] restrict e2e_test_setup.mjs to running in the dev-env

Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com>

* [saas-e2e] import latest split-tests from production

---------

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com>
GitOrigin-RevId: 034343ee56b8d059090d8a5de74eaac24429b527
2025-03-24 10:46:15 +00:00
Christopher Hoskin
c3ade4dce1 Merge pull request #24070 from overleaf/csh-fix-check_institution_users
Allow higher timeouts

GitOrigin-RevId: 8b762cab7cf1420cec732ea592a8075e96b9a5f8
2025-03-13 09:05:45 +00:00
Jimmy Domagala-Tang
8a81b0777a Merge pull request #23820 from overleaf/jdt-transition-wf-accounts-script
Script to transition WF users from auto-load to auto-create

GitOrigin-RevId: 538ff04dece52e4c46a4a592cb5089d20eb5aa7a
2025-02-28 09:05:25 +00:00
Antoine Clausse
0abdbc0093 [web] Add script to attach dangling comments to a document (#23904)
* Add script to attach dangling comments to a document

* Fix comment id field

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: b51c9c57542b24bd27cb9475b088eb2f0d88b3af
2025-02-28 09:05:06 +00:00
Antoine Clausse
08ee37afc1 Update to lockfile-version 3 (#23839)
`npm i --lockfile-version 3`

GitOrigin-RevId: ee5b547b2d7ddd3395f55825123af8a68bfbecd6
2025-02-26 09:05:11 +00:00
Eric Mc Sween
59fb97d874 Merge pull request #23819 from overleaf/em-find-projects
Rename find_dangling_comments script to check_docs and make improvements

GitOrigin-RevId: 3c81c734f4259c5939c190a886b5b90239d03017
2025-02-26 09:04:54 +00:00
Eric Mc Sween
819e49aa17 Merge pull request #23784 from overleaf/em-find-dangling-comments-modified-since
Add --project-modified-since option to find_dangling_comments script

GitOrigin-RevId: 69483611dbfa71eeb16206387771b2b9d837f978
2025-02-24 09:04:49 +00:00
Eric Mc Sween
fb22d6f518 Merge pull request #23725 from overleaf/em-find-dangling-comments-archived-docs
Look at archived docs when looking for dangling comments

GitOrigin-RevId: fb04b9428ce83802b6e658153c5bbe70e983de65
2025-02-21 09:05:04 +00:00
Andrew Rumble
0e64fe2b21 Merge pull request #23457 from overleaf/ar-recurly-account-mapping-initial
[web] setup Recurly -> Mongo account mapping

GitOrigin-RevId: ee08cad60ee04e62100f3d5a4f76fdbcf5543917
2025-02-21 09:04:45 +00:00
Eric Mc Sween
5f6de9caf0 Merge pull request #23706 from overleaf/em-fix-dangling-comments-script
Fix dangling comments script when doc does not have ranges

GitOrigin-RevId: 31cf25ecf79f7ab0ed872c403d31b2c5064b4c76
2025-02-20 09:06:05 +00:00
Antoine Clausse
98ea3664f2 Create script: remove_unconfirmed_emails.mjs (#23079)
* Create script: remove_unconfirmed_emails.mjs

* Update script remove_unconfirmed_emails.mjs after pairing

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>

* Add user counts. Add timing

* Revert previous changes: just remove the fully unconfirmed emails

* Add tests on scripts/remove_unconfirmed_emails.mjs

* Update audit log so `removedEmail` is a string and doesn't break the admin-panel audit logs list

* Update remove_unconfirmed_emails to have a `--generate` and a `--consume` mode

* Update tests on remove_unconfirmed_emails

* Add tests checking that `--consume` doesn't delete any email

* Update script so `--consume` checks that emails shouldn't be deleted again!

* Update CSV path to `/tmp/...`

* Add test cases: deleted users, deleted email, comma in email

---------

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
GitOrigin-RevId: 8c60b56bcdfa33bc6143d66c32a5f430fb76f6d7
2025-02-18 09:05:10 +00:00
Eric Mc Sween
b507c8e1bb Merge pull request #23612 from overleaf/em-find-dangling-comments
Add script to find projects with dangling comments

GitOrigin-RevId: 31048defa2f33c2bf23d14ddc643366775df3104
2025-02-18 09:04:34 +00:00
Domagoj Kriskovic
126648e597 Script for updating comment id to match the one from history (#23460)
* Script for updating comment id to match the one from history

* update multiple comments in a single query

* use array filters for updating comments

* log doc id

GitOrigin-RevId: ca4337591735d0d76d5599c19cc42628421ed14f
2025-02-12 09:05:42 +00:00
ilkin-overleaf
667b97664c Merge pull request #23366 from overleaf/ii-flexible-licensing-add-seats-for-all-legacy-plans
[web] Add seats feature for smaller groups

GitOrigin-RevId: 7b0d1ea61eaaf603610d5fd8df399c00d328be70
2025-02-05 09:05:32 +00:00
Antoine Clausse
3312d97a6b [web] Add tests on find_malformed_filetrees and fix_malformed_filetree, partially fix fix_malformed_filetree (#23120)
* Create tests on find_malformed_filetrees and fix_malformed_filetrees

* Remove lines that are making fix_malformed_filetree fail

These lines are causing errors such as
```
Missing file hash: 586846800000000000000000/5891271c0000000000000000 (rootFolder.0.folders.2.fileRefs.7.hash)
SaaS: likely needs filestore restore
Server Pro: please reach out to support
```

* Add snapshots of projects after fix_malformed_filetree

* Set `WRITE_SNAPSHOT` as false

* Make `deleteProjectsRecordId0` constant

* Ignore duplicated ID errors in CreateMalformedFileTrees.mjs

* Move snapshots to directory folder

* Remove unnecessary code

* Update tests to cover use cases from the scripts

* Fix: Use `new ObjectId(projectId)` instead of the string in mongo queries

* Fix: Query `rootFolder: []` to fix more than `rootFolder: { $size: 0 }`

* Remove/rename files from first draft

* Remove empty strings from expects in unrelated tests, now that `filterOutput` removes them

* Add missing `expectFixStdout` to tests

* misc: rename test util to strId

* Add "well formed filetrees" to test cases

* Use `wellFormed` variable to remove some duplication

* Update tests:
- check Missing file hash path
- remove test on string/numbers as array items

* Add test "bug: shifted arrays in filetree"

* Rename `wellFormedFile` to `wellFormedFolder`

* Fix name of the root folder to `'rootFolder'`, not `'untitled'`

GitOrigin-RevId: dc098bb7ad3ca441fe2bb72b5f5f0e3bcedbdf67
2025-01-31 09:05:27 +00:00
Liangjun Song
6245e81f42 Merge pull request #22518 from overleaf/ii-flexible-group-licensing-add-seats-legacy
[web] Unlock self-served license purchasing for legacy plans

GitOrigin-RevId: bf3083d00a77417f0e78d2145f6192c57b163273
2025-01-29 09:05:25 +00:00
Jimmy Domagala-Tang
0baaed6cdf Merge pull request #22994 from overleaf/jdt-diasble-assist
Add a toggle to hide all AI features on a users account

GitOrigin-RevId: 978b02609c40f3975daa267aa6c10ac49e13d6f3
2025-01-28 09:05:27 +00:00
Andrew Rumble
342bbe5f0b Merge pull request #22943 from overleaf/ar-ss-migrate-sync-group-memberships-to-raw
[web] migrate sync group memberships to raw

GitOrigin-RevId: 8c2ea9fef84ec1abcc99deef841e085d62739050
2025-01-28 09:05:05 +00:00
Antoine Clausse
272108a213 Run bin/update_node 20.18.0 20.18.2 (#23074)
GitOrigin-RevId: 3f1ab14c4c36ea54408e0ce2c404a323bfe8d9a6
2025-01-24 09:06:05 +00:00
Kristina
0bbe4b2e5a [web] show monthly rates on group plans (#23019)
GitOrigin-RevId: e500869be9def2c150b4773f2f18883021ab356b
2025-01-24 09:05:26 +00:00
Kristina
0d42173034 [web] add annual-prices-monthly-rates experiment (#22956)
* [web] add annual-prices-monthly-rates experiment
* [web] add annualMonthly to plans.mjs and update settings.overrides.saas.js
* [web] display monthly rates on individual plans on desktop
* [web] display monthly rates on individual plans on mobile
* [web] add monthly rates split test to view event segmentation

GitOrigin-RevId: 4ddbdc2fc6a9ec5a868643d3fc0e3f78ef27772d
2025-01-24 09:05:17 +00:00
Jakob Ackermann
04c1497673 [web] extend scripts for finding and fixing broken file-trees (#22984)
- Validate _id fields to be ObjectIds
- Include more debug output, notably include the folder/doc/file id
- Emit and consume JSON output
- Read broken file-tree details from (ad-hoc) file
- Use generator instead of accumulating all results per project first
- Use batchedUpdate to be able to pause and resume processing

GitOrigin-RevId: 606ac431fff65891e09479c0ba9bcb7e7dc5cbe4
2025-01-22 09:05:12 +00:00
Jakob Ackermann
f03d346a32 Merge pull request #22882 from overleaf/jpa-file-tree-script
[web] scripts/find_malformed_filetrees: flag missing file hash and folder arrays

GitOrigin-RevId: 8561a59856486bd6903f84a99434d0bd81acb175
2025-01-20 09:04:45 +00:00
Antoine Clausse
b9fb636f0b [web] Remove promises exports from Controller modules (#22242)
* Remove promises object from CollaboratorsInviteController.mjs

* Define functions at root

* Remove mentions of undefined `revokeInviteForUser`

* Remove unused `doLogout`

* Remove promises object from UserController.js

* Remove unused `makeChangePreview`

* Remove promises object from SubscriptionController.js (`getRecommendedCurrency` and `getLatamCountryBannerDetails`)

* Remove promises object from CollabratecController.mjs

* Remove promises object from SSOController.mjs

* Remove promises object from ReferencesApiController.mjs

* Remove promises object from MetricsEmailController.mjs

* Remove promises object from InstitutionHubsController.mjs

* Remove promises object from DocumentUpdaterController.mjs

* Remove promises object from SubscriptionAdminController.mjs

* Fixup unit tests

* Add expects that controllers don't error

* Promisify `ensureAffiliationMiddleware`

GitOrigin-RevId: 311c8afa7d5c8e4f051408d305b6b4147a020edc
2025-01-17 09:05:36 +00:00
Eric Mc Sween
eb1b939f5a Merge pull request #22567 from overleaf/em-collection-method
Add collection method field to Mongo subscriptions

GitOrigin-RevId: 7fffabaecfde8f7da8e05fcedcbbf0b2fdcc70f5
2025-01-10 09:05:25 +00:00
Thomas
d8840bfe7f Merge pull request #22433 from overleaf/tm-suspend-users-script
Add script for bulk account suspension

GitOrigin-RevId: 434ac819c12a2a33c26baf963d8d8874b1864928
2024-12-11 09:04:40 +00:00
Jimmy Domagala-Tang
ab5a539c62 Merge pull request #22110 from overleaf/jdt-remove-assistant-from-labs
[Web] End Error Assist Labs Experiment

GitOrigin-RevId: 2570c07aea3d6b71dc59792cd2248cb890b415d3
2024-12-06 09:06:32 +00:00
Eric Mc Sween
b68f758fd5 Merge pull request #22274 from overleaf/em-setup-recurly-add-ons
Set up assistant add-on only on group plans available in production

GitOrigin-RevId: a47c05443c5bf4a1bb1fb26d45a3705a544ba7c5
2024-12-05 09:04:59 +00:00
roo hutton
172aeb59d1 Merge pull request #22260 from overleaf/rh-odc-students-never-used
Add student filter and country field to 'never used LaTeX' ODC script

GitOrigin-RevId: 9db298a48b7d70b59b81388ff93fc6c9575861d7
2024-12-03 09:04:59 +00:00
Antoine Clausse
b27b2808f2 [web] Fixup .mjs extension in scripts mentions (calls, comments, copybara) (#21969)
* Fixup `.mjs` extension in scripts mentions (calls, comments, copybara)

* Replace `.js` by `.*` in copy.bara.sky exclude

* Add `services/web/modules/modules-*.mjs` in copy.bara.sky glob

GitOrigin-RevId: b3ecb849b44bdf4257cc17f6985f8117a4d662ae
2024-11-21 09:04:23 +00:00