Commit graph

1575 commits

Author SHA1 Message Date
Alexandre Bourdin
3022f573e9 Merge pull request #18022 from overleaf/revert-18018-revert-17906-ab-split-test-assignments-optim-pt2
Revert "Revert "[web] Store anonymous users split test assignments in new format in session""

GitOrigin-RevId: bd48a21c17df91eda1536378d8d999a1933e83a2
2024-04-23 08:04:47 +00:00
roo hutton
06cac44d84 Merge pull request #18021 from overleaf/rh-mailchimp-api
[web] Replace node-mailchimp with own MailChimpClient

GitOrigin-RevId: 10207620c48f30ad29f4f0e7ea5193c11d256902
2024-04-22 08:04:33 +00:00
roo hutton
9601fd097a Merge pull request #17946 from overleaf/rh-promisify-third-party-identity-
[web] Promisify ThirdPartyIdentityManager and ThirdPartyIdentityManagerTests

GitOrigin-RevId: f7d24f73213fb0a43eb453aa21749b21ba60b83d
2024-04-22 08:04:28 +00:00
Alexandre Bourdin
14bbc65e99 Merge pull request #18018 from overleaf/revert-17906-ab-split-test-assignments-optim-pt2
Revert "[web] Store anonymous users split test assignments in new format in session"

GitOrigin-RevId: 2c1a95031a9d1d99b9dfef54eb4b80264a32ba0d
2024-04-19 08:04:27 +00:00
Alexandre Bourdin
bfe75c7d31 Merge pull request #17906 from overleaf/ab-split-test-assignments-optim-pt2
[web] Store anonymous users split test assignments in new format in session

GitOrigin-RevId: a5f71f7dcad7e7b11fc6a391bd5182525b3bdf03
2024-04-19 08:04:23 +00:00
Alexandre Bourdin
bee4c95c28 Merge pull request #17907 from overleaf/ab-split-test-assignments-optim-pt1
[web] Read anonymous split test assignments in session from both old&new fields

GitOrigin-RevId: 5235bb3e7d72d5ff9e89c6543b70fb80e9f1213c
2024-04-19 08:04:11 +00:00
David
0cf17478fe Merge pull request #17810 from overleaf/dp-compormised-password-prompt
Add compromised password prompt

GitOrigin-RevId: 7910a220943fcb3aa191da6d514d5bc3ae20f5a3
2024-04-19 08:03:58 +00:00
Antoine Clausse
b2ef7a935f [web] Use localized number formatting for currencies (#17622)
* Add a unit test on `SubscriptionFormatters.formatPrice`

* Add JSDoc to `formatPrice`

Also: Name the functions before exporting:
This fixes my IDE (WebStorm) navigation

* Make `'USD'` the default param instead of reassigning

* Create `formatCurrency` function

* Use `formatCurrency` in SubscriptionFormatters

* Use an `isNoCentsCurrency` logic for `CLP` `JPY` `KRW` `VND`

And remove custom `CLP` logic and locale

* Add `locale` param to `formatPrice`

* Generate `groups.json` and `localizedPlanPricing.json`

```
bin/exec web node ./scripts/recurly/recurly_prices.js --download -o prices.json
bin/exec web node ./scripts/plan-prices/plans.js -f ../../prices.json -o dir
```

* Update scripts/plan-prices/plans.js to generate numbers instead of localized amounts

* Generate `groups.json` and `localizedPlanPricing.json`

```
bin/exec web node ./scripts/recurly/recurly_prices.js --download -o prices.json
bin/exec web node ./scripts/plan-prices/plans.js -f ../../prices.json -o dir
```

* Remove generation of `plans.json`

As /services/web/frontend/js/main/plans.js was removed in https://github.com/overleaf/internal/pull/12593

* Sort currencies in alphabetical order in scripts/plan-prices/plans.js

* Generate `groups.json` and `localizedPlanPricing.json`

```
bin/exec web node ./scripts/recurly/recurly_prices.js --download -o prices.json
bin/exec web node ./scripts/plan-prices/plans.js -f ../../prices.json -o dir
```

* Use `formatCurrency` in price-summary.tsx

* Use `formatCurrency` in Subscription Pug files

* Fix unit tests SubscriptionHelperTests.js

* Remove unused `currencySymbol`

* Change to `formatCurrency` in other React components

* Add `CurrencyCode` JSDoc types

* Duplicate `formatCurrency` into services/web/app/src/util

* Wrap tests in a top-level describe block

* Use `narrowSymbol`

* Fix tests with `narrowSymbol` expects

* Revert deletion of old `formatPrice` in SubscriptionFormatters.js

* Rename `formatCurrency` -> `formatCurrencyLocalized`

* Revert deletion of `CurrencySymbol`

* Add split-test in SubscriptionController.js

* Add split-test in SubscriptionViewModelBuilder.js

* Add split-test in plans

* Add split-test in subscription-dashboard-context.tsx

* Add split-test in 4 more components

* Update tests

* Show currency and payment methods in interstitial page

* Fix `–` being printed. Use `–` instead

* Fix test with NOK

* Storybook: Fix missing `SplitTestProvider`

* Storybook: Revert "Remove unused `currencySymbol`"

This reverts commit e55387d4753f97bbf8e39e0fdc3ad17312122aaa.

* Replace `getSplitTestVariant` by `useSplitTestContext`

* Use parameterize currencyFormat in `generateInitialLocalizedGroupPrice`

* Fixup import paths of `formatCurrencyLocalized`

* Replace `% 1 === 0` by `Number.isInteger`

* Add comment explaining that any combinations of languages/currencies could happen

* Fixup after rebase: import `useSplitTestContext`

* Revert "Remove SplitTestProvider from subscription root"

This reverts commit be9f378fda715b86589ab0759737581c72321d87.

* Revert "Remove split test provider from some tests"

This reverts commit 985522932b550cfd38fa6a4f4c3d2ebaee6ff7df.

GitOrigin-RevId: 59a83cbbe0f7cc7e45f189c654e23fcf9bfa37af
2024-04-19 08:03:54 +00:00
Antoine Clausse
616bd0df16 Merge pull request #17925 from overleaf/jpa-ac-20s-timeout-migration-logging-tweaks
[web] timeout 20s split-test teardown cleanups (remove override, remove tests, ...)

GitOrigin-RevId: 8d8c44539cf45d0f5142f84cf8372cecda3bf77a
2024-04-17 08:04:30 +00:00
Jakob Ackermann
ac2ea9f34d Merge pull request #17865 from overleaf/jpa-open-in-overleaf-session-storage
[web] open-in-overleaf: cleanup redis and browser session storage

GitOrigin-RevId: af79bb49ff474545fc0d206d2a6f5a0ffa1416bc
2024-04-17 08:04:04 +00:00
Antoine Clausse
d35204033f Merge pull request #17909 from overleaf/ac-tear-down-compile-timeout-tests-2
[web]  Remove split-tests `compile-backend-class*` and `compile-timeout-20s*` (attempt 2)

GitOrigin-RevId: 5658f2977d3e7089eec5bbe7a33eee81c153e41d
2024-04-16 08:04:08 +00:00
Alexandre Bourdin
5f8db6ee23 Merge pull request #17799 from overleaf/ab-account-deletion-audit-log
[web] Add audit log when user account is deleted or recovered

GitOrigin-RevId: 3d5f99705fbd6192ccae430e040be4b7fcb3f740
2024-04-15 08:04:42 +00:00
Antoine Clausse
491bc2628d Merge pull request #17899 from overleaf/revert-17700-ac-tear-down-compile-timeout-tests
Revert "[web] Remove split-tests `compile-backend-class*` and `compile-timeout-20s*`"

GitOrigin-RevId: d5070ced06adbd435e782a44b7ef767e395bd6a0
2024-04-15 08:04:37 +00:00
Antoine Clausse
2dd10c7fee [web] Remove split-tests compile-backend-class* and compile-timeout-20s* (#17700)
* Remove split-tests of `compile-timeout-20s` and `compile-timeout-20s-existing-users`

* Remove `NEW_COMPILE_TIMEOUT_ENFORCED_CUTOFF` variables

* Revert timeout override `60` -> `20`

* Update settings.overrides.saas.js: `compileTimeout: 20`

* Remove `compile-backend-class-n2d`

* Remove `force_new_compile_timeout`

* Remove `showNewCompileTimeoutUI`

* Remove `compileTimeChanging`

* Simplify code by removing segmentation object

* Remove `CompileTimeoutChangingSoon`

* Remove `user.features.compileTimeout = '20 (with 10s prompt)'`

* Remove `CompileTimeWarning`

* Remove `TimeoutUpgradePrompt` (old)

* Remove `compile-backend-class`

* Remove unused translations

* Update tests

* Fix: Show `CompileTimeout` even if `!window.ExposedSettings.enableSubscriptions`

* Create script to migrate users to 20s compileTimeout

* migration script: exclude `compileTimeout: 20` from the match

* migration script: use `batchedUpdate`

* Remove `showFasterCompilesFeedbackUI` and `FasterCompilesFeedback`

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

* Remove `_getCompileBackendClassDetails`, simplify definition of `limits` object

* Remove `Settings.apis.clsi.defaultBackendClass`

* Remove unnecessary second scan of the whole user collection in dry mode

* Override `timeout` to 20 for users having `compileGroup === 'standard' && compileTimeout <= 60`

* Remove second `logCount`: re-run the script in dry-mode if you want to see that count

* Use secondary readPreference when counting users

* Fix script setup and exit 0

* Fix: Remove `user.` from query path!

* Add acceptance test on script migration_compile_timeout_60s_to_20s.js

GitOrigin-RevId: 3cb65130e6d7fbd9c54005f4c213066d0473e9d8
2024-04-15 08:04:24 +00:00
roo hutton
03fb015f8f Merge pull request #17856 from overleaf/rh-deletion-email-update
[web] Use securityAlert template for user deletion email

GitOrigin-RevId: 60dfef18946710f5d5df17daca1a0bdc9800519b
2024-04-12 08:06:40 +00:00
roo hutton
754609f379 Merge pull request #17830 from overleaf/rh-reduce-staff-access-session
[web] Reduce size of staffAccess field in session

GitOrigin-RevId: 7745dc595e8096caef04fd140b47532f0775f165
2024-04-12 08:06:35 +00:00
Jessica Lawshe
0cfcdf5e4d Merge pull request #17822 from overleaf/jel-dash-usersBestSubscription
[web] Limit data sent to dash for best subscription when group

GitOrigin-RevId: d52101bec69cbb7931e9702e085b4aeb65d9d603
2024-04-12 08:06:09 +00:00
roo hutton
bf7a18db8b Merge pull request #17730 from overleaf/rh-acct-delete-email
[web] Send email notification on account deletion

GitOrigin-RevId: 03c0effba0ee3b829f5b4fe377fe67d05776ba3f
2024-04-10 08:04:12 +00:00
Domagoj Kriskovic
8bde496da4 Send operations to project-history when resolving/unresolving comments (#17540)
* Send operations to project-history when resolving/unresolving comments

* small fixes

* added doc_id in web unit test

* Revert "added doc_id in web unit test"

This reverts commit f0b8251abfce17965d5e1b0e45d8784fcf1d9eed.

* fix mocked dependency in test

* wip: web unit tests

* document updater, reopen test

* document-updater tests

* format fix

* fix typo

* fix callsArgWith

* fix reopenThread calls in doc updater tests

* fix typos

* log error if chat api resolve failes

* log error when reopening thread

* sendStatus calls done() in tests

* using OError instead of logging

* removed timers

* preserve legacy endpoints

* update after merge

* Remove timer check in HttpControllerTest

* prettier

* added "legacy" in log

* remove metrics.timer

* fix promisify issues

* remove unused cb

GitOrigin-RevId: 849538c86996973a065c727835e93028e5429344
2024-04-10 08:04:08 +00:00
roo hutton
8644e239c6 Merge pull request #17596 from overleaf/rh-permissions-policy
[web] Add Permissions-Policy header

GitOrigin-RevId: 8934bbbda411102580d9ef8af135dcdc147627f9
2024-04-08 08:04:29 +00:00
roo hutton
67e9a40e87 Merge pull request #17680 from overleaf/rh-promisify-templates-man
[web] Promisify TemplatesManager and TemplatesManagerTests

GitOrigin-RevId: 69ff0a5f34ceb7b4c23452bb00963eda35621f3f
2024-04-08 08:04:25 +00:00
M Fahru
d836631902 Merge pull request #17548 from overleaf/mf-promisify-render-set-password-form
[web] promisify renderSetPasswordForm

GitOrigin-RevId: 3a79a7fd23de2d7ff87a833204298aed6cc303a5
2024-03-29 09:04:26 +00:00
Mathias Jakobsen
192c497508 Merge pull request #17671 from overleaf/mj-project-projection
[web] Use projection when fetching project

GitOrigin-RevId: 4c7eb6582dba9ffa81f8d34c4e353faf1dc15c83
2024-03-29 09:04:13 +00:00
Mathias Jakobsen
48f8fe9dd6 [web] Add current history tab to admin panel (#17482)
* [web] Add current history tab to admin panel

GitOrigin-RevId: 95a479d01bdf2ca65cd9b18077823d895cc12501
2024-03-29 09:04:02 +00:00
Mathias Jakobsen
44d0b947ce Merge pull request #17553 from overleaf/mj-admin-history-ranges-enable
[web] Add button for adding history ranges support in admin panel

GitOrigin-RevId: fa85b25719fff753f0d0806ccb02ad2f9db2ee82
2024-03-28 09:03:51 +00:00
Alf Eaton
6cc2db3cdd Merge pull request #17525 from overleaf/ae-upgrade-prettier
Upgrade Prettier to v3

GitOrigin-RevId: 6f1338f196408f3edb4892d5220ad3665ff1a5bc
2024-03-26 09:04:05 +00:00
Thomas
8a04ec9b75 Merge pull request #17572 from overleaf/tm-email-confirmation-require-login
Prevent email confirmation unless logged in to the requesting account

GitOrigin-RevId: 28af875b2887b8bbef8327097635aa01345c682c
2024-03-22 09:03:10 +00:00
Thomas
811173d32d Merge pull request #17569 from overleaf/tm-account-suspension
Add the ability to suspend user accounts

GitOrigin-RevId: 5e57f29941434c78a47354baca83527213f9b9b5
2024-03-22 09:03:06 +00:00
Domagoj Kriskovic
3e701f1388 Send operations to project-history when deleting comments (#17198) (#17494)
* Make Operation.fromRaw parse AddComment operations

* Send operations to project-history when deleting comments

* remove RedisManager.updateDocument call

* format fix

* Revert "remove RedisManager.updateDocument call"

This reverts commit 5d45f34b5919bf5a85e8475e5a450bcb213d3f82.

* remove versions from deleteComment op

* pass userId to deleteComment operation

* revert userId from chat service

* revert userid from chat tests

* format:fix

* document updater fix tests

* format:fix

* fix web unit test

* deleteThread test fix

* send only if historyRangesSupport is true

* use headers to pass userId

* set historyRangesSupport in tests

* optional headers

* Revert "use headers to pass userId"

This reverts commit e916c469f95b1ac166e30e12e735171eb814af01.

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: 14c10669e43d76883dbaaa8ab55e102b5ebadd38
2024-03-12 09:03:55 +00:00
Jessica Lawshe
d65bba566c Merge pull request #17315 from overleaf/ab-accounts-settings-sso-status
[web] Show Group SSO linking status on the account settings page

GitOrigin-RevId: ae45e1bd7a90a672c5fb023e7f3e603a00e364e5
2024-03-12 09:03:43 +00:00
Jessica Lawshe
814ee0ac62 Merge pull request #17351 from overleaf/jel-async-getUserForPasswordResetToken
[web] Promisify getUserForPasswordResetToken

GitOrigin-RevId: 4b0363b390af155f1bae4332fba7cf10c130e1c6
2024-03-12 09:03:35 +00:00
Jessica Lawshe
7a9c2fd644 Merge pull request #17329 from overleaf/jel-async-peekValueFromToken
[web] Promisify peekValueFromToken

GitOrigin-RevId: 4a7f6ae793ff0a1bd22c89c963881ef0957e29e8
2024-03-12 09:03:32 +00:00
Miguel Serrano
02d890ef18 Merge pull request #17426 from overleaf/msm-expressify-controllers
[web] Expressify controller methods

GitOrigin-RevId: 9784176b53a89beed09f9b38915872a6e7fae465
2024-03-12 09:03:26 +00:00
Miguel Serrano
d2cfa26807 Merge pull request #17418 from overleaf/msm-expressify-usermembershipctlr
[web] expressify UserMembershipController

GitOrigin-RevId: 54f8d718bffb52609f055490f2a996f6c007f472
2024-03-12 09:03:20 +00:00
David
1ba5b27e57 Merge pull request #17408 from overleaf/dp-mongoose-callback-autherntication-manager
Promisify AuthenticationManager and AuthenticationManagerTests

GitOrigin-RevId: 8120bf55d19380a6ecf5241ffab8722eff2d4fe3
2024-03-12 09:03:14 +00:00
Domagoj Kriskovic
f5b894bc2e Revert "Send operations to project-history when deleting comments (#17198)" (#17476)
This reverts commit 34ab7e4ea6dd1b5fd749f9accaf4a6e16ae1d840.

GitOrigin-RevId: 005de52bcacbacf62d22cd8617d7a765f56bd72e
2024-03-11 09:04:29 +00:00
Domagoj Kriskovic
4a3a0752a4 Send operations to project-history when deleting comments (#17198)
* Make Operation.fromRaw parse AddComment operations

* Send operations to project-history when deleting comments

* remove RedisManager.updateDocument call

* format fix

* Revert "remove RedisManager.updateDocument call"

This reverts commit 5d45f34b5919bf5a85e8475e5a450bcb213d3f82.

* remove versions from deleteComment op

* pass userId to deleteComment operation

* revert userId from chat service

* revert userid from chat tests

* format:fix

* document updater fix tests

* format:fix

* fix web unit test

* deleteThread test fix

* send only if historyRangesSupport is true

* use headers to pass userId

* set historyRangesSupport in tests

* optional headers

* Revert "use headers to pass userId"

This reverts commit e916c469f95b1ac166e30e12e735171eb814af01.

---------

Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com>
GitOrigin-RevId: 34ab7e4ea6dd1b5fd749f9accaf4a6e16ae1d840
2024-03-11 09:04:24 +00:00
David
43007539a0 Merge pull request #17380 from overleaf/dp-mongoose-callback-toke-access-handler
Promisify TokenAccessHandler and TokenAccessHandlerTests

GitOrigin-RevId: 835081e78977456a59b7e16043fd6dcbdbce3ade
2024-03-06 17:27:40 +00:00
Jakob Ackermann
84a2b25a3c Merge pull request #17401 from overleaf/jpa-skip-hibp-known-device
[web] skip HIBP check from known devices

GitOrigin-RevId: 897df02492aafeac010753c7c306e02bde5b1fd8
2024-03-05 09:03:37 +00:00
David
857a45edeb Merge pull request #17171 from overleaf/dp-mongoose-callback-project-collabratec
Promisify ProjectCollabratecDetailsHandler and ProjectCollabratecDetailsHandlerTest

GitOrigin-RevId: efd911dcbba58f706adfd3b7a5c043280f6cc1af
2024-03-05 09:03:22 +00:00
David
db1508be69 Merge pull request #17075 from overleaf/dp-mongoose-callback-subscription-group-handler
Promisify SubscriptionGroupHandler and SubscriptionGroupHandlerTests

GitOrigin-RevId: 998ebb56f9cffe59f7cb490220bccbeedb133a7b
2024-03-05 09:03:19 +00:00
David
6551aba1a5 Merge pull request #17005 from overleaf/dp-mongoose-callback-subscription-handler
Promisify SubscriptionHandler and SubscriptionHandlerTests

GitOrigin-RevId: b34328ee2cca4449a02723a587a1bfb887ed847a
2024-03-05 09:03:15 +00:00
Jessica Lawshe
cb3f70f7ab Merge pull request #17289 from overleaf/jel-permissions-controller
[web] Move user permissions check to manager

GitOrigin-RevId: 8c59d053da3d8d452cd424b04baa05f5d7d9057a
2024-02-29 09:04:37 +00:00
David
84c3dc1fff Merge pull request #17268 from overleaf/dp-remove-old-mongo-metrics
Remove timeAsyncMethod mongo metrics

GitOrigin-RevId: 1ba3a1fd51b9d0766355c31791ae9836d832afe8
2024-02-29 09:04:19 +00:00
David
6d99f6dfae Merge pull request #17201 from overleaf/dp-ip-rate-limit
Add subnet rate limiter for login rate limit

GitOrigin-RevId: c9f68829887dbc1778eff3b465dbde40bc2073d8
2024-02-29 09:04:15 +00:00
David
3c98e028f5 Merge pull request #17206 from overleaf/dp-mongoose-callback-institutions-manager
Promisify InsitutionsManager and InstitutionsManagerTests

GitOrigin-RevId: 0872aabb646ee143f51a92608f91d7901723ec0c
2024-02-29 09:04:11 +00:00
David
6a96e160d9 Merge pull request #17079 from overleaf/dp-mongoose-callback-subscription-locator
Promisify SubscriptionLocator and SubscriptionLocatorTests

GitOrigin-RevId: 9956a72d0cd94cb0b89da0fc1ec9c0e06fdcfeea
2024-02-29 09:04:07 +00:00
David
0827139e48 Merge pull request #17155 from overleaf/dp-mongoose-callback-user-registration-handler
Promisify UserRegistrationHandler and UserRegistrationHandlerTests

GitOrigin-RevId: b561f5574883b016824077e971aa4613b44a42dd
2024-02-29 09:04:03 +00:00
Brian Gough
6bd5038791 Merge pull request #17282 from overleaf/bg-object-id-unit-tests-ii
add unit tests for ObjectId comparison with chai and sinon

GitOrigin-RevId: e23156f6fd95f37d447f7569a01916c71bf04ede
2024-02-27 09:03:04 +00:00
ilkin-overleaf
b04247dd5a Merge pull request #17023 from overleaf/ii-token-access-null-values
[web] Fix projects token access values

GitOrigin-RevId: f0c6a4993e42320c06753cb65198138afe55b71a
2024-02-26 09:03:13 +00:00