Commit graph

3645 commits

Author SHA1 Message Date
Antoine Clausse
3300811d3a [web] Simplify removeSessionsFromRedis signature (#18440)
* Simplify `removeSessionsFromRedis` signature

* Update usage of `removeSessionsFromRedis`

* Fix tests around `removeSessionsFromRedis`

* Add comments "remove all sessions except the current session"

GitOrigin-RevId: 03bf99c14faf2c8e403bc4bcc16463a70e031284
2024-05-27 10:21:30 +00:00
Antoine Clausse
78a0bc2b05 [web] Convert RecurlyWrapper functions to async (#18384)
* Rename `RecurlyWrapper` to `promises`, as it will only contain the promises soon

* Update `apiRequest`

* Update `_parseXml`

* Update `_parseXmlAndGetAttribute`

* Update `_parse*Xml`

* Update `updateAccountEmailAddress`

* Update `checkAccountExists`

* Update `createAccount`

* Update `createBillingInfo`

* Update `setAddressAndCompanyBillingInfo`

* Update `createSubscription`

* Update `_createPaypalSubscription`

* Update `_handle422Response`

* Update `_createCreditCardSubscription`

* Update `createSubscription`

* Update `getSubscriptions`

* Update `getSubscription`

* Update `getPaginatedEndpoint`

* Update `getAccount`

* Update `getAccountActiveCoupons`

* Update `getCoupon`

* Update `getBillingInfo`

* Update `getAccountPastDueInvoices`

* Update `attemptInvoiceCollection`

* Update `updateSubscription`

* Update `createFixedAmmountCoupon`

* Update `lookupCoupon`

* Update `redeemCoupon`

* Update `extendTrial`

* Update `listAccountActiveSubscriptions`

* To find which functions to add as callbackified, I used this Regex:
`RecurlyWrapper\.(?!promises)[^.\s]*`

And after adding callbackified functions, we're left with no results with the Regex:
`RecurlyWrapper\.(?!promises|apiUrl|_buildXml|_parseXml|attemptInvoiceCollection|createFixedAmmountCoupon|getAccountActiveCoupons|getBillingInfo|getPaginatedEndpoint|getSubscription|updateAccountEmailAddress)[^.\s]*`

* Update unit tests

* Test `getSubscription` both as "promise" and as "callback"

I'm not sure if we want to generalize this.

* Fix: add missing `await`s (!!)

* Change `apiRequest` to reject errors instead of resolving it in an object

* Fixup for CollectPayPalPastDueInvoice test

* Fix: callbackify `getSubscriptions` (!!)

* Replace `.then(...)` chain by multiple `await`

* Fixup `attemptInvoicesCollection`: prevent reading length of undefined

* Use `return await` when returning promises

Per https://github.com/overleaf/internal/pull/18384#pullrequestreview-2065738771

GitOrigin-RevId: ceda755b24fd29f97a27e60ac5db9bc7e369f932
2024-05-27 10:21:26 +00:00
ilkin-overleaf
d56f5a3030 Merge pull request #18424 from overleaf/ii-delete-with-body-fe
[web] Replace delete with post requests when having body (FE)

GitOrigin-RevId: df727f35ea77eaa8273687f75aafd9bd983b7f25
2024-05-21 08:04:48 +00:00
Alf Eaton
e7827fbd57 Validate URL protocol before opening from Visual Editor tooltip (#18393)
GitOrigin-RevId: 1da255d3e8ccd91e8c8774d140ec663906be948f
2024-05-21 08:04:26 +00:00
Eric Mc Sween
dfd1652c35 Merge pull request #18375 from overleaf/em-promisify-chat-api-handler
Promisify ChatApiHandler

GitOrigin-RevId: 83cedb14b5e2b187fb2cb02fcbf888ada5a599b1
2024-05-20 08:04:22 +00:00
Antoine Clausse
25d8e053be [web] Update revokeAllUserSessions and rename it to removeSessionsFromRedis (#18360)
* Fix `revokeAllUserSessions` call in `_cleanupUser`

The user object should be passed, not the _id

* Change `revokeAllUserSessions` signature, take `req` and `stayLoggedIn` arguments

* Update uses of `revokeAllUserSessions`

* Fix promisified `revokeAllUserSessions` args

* Update tests

* Destroy or Regenerate the session in the end of `revokeAllUserSessions`

Per https://github.com/overleaf/internal/issues/17036#issuecomment-1938398570

* Revert "Destroy or Regenerate the session in the end of `revokeAllUserSessions`"

This reverts commit fe30734dbe45b27d2931d2e43a711d591bb85787.

* Rename `revokeAllUserSessions` to `removeSessionsFromRedis`

* Fixup tests

* Fix: add optional chaining in `req.sessionID` (!!)

GitOrigin-RevId: d41676bf00f463230af495e09c65fb9ee521f49f
2024-05-20 08:04:12 +00:00
M Fahru
9f86f90a08 Merge pull request #18095 from overleaf/mf-general-contact-form-redesign
[web][website-redesign] General contact form redesign

GitOrigin-RevId: f5f3a37fea69afb48a37b263695c958e6753e095
2024-05-17 08:04:53 +00:00
Jakob Ackermann
dfe587f297 Merge pull request #18294 from overleaf/jpa-td-invite-details
[web] avoid content reflection via query parameter on register page

GitOrigin-RevId: 43e7ba6069e0d9f3f12e5e9e680b5960b0673782
2024-05-16 08:05:09 +00:00
Rebeka Dekany
3ef06d57c6 Merge pull request #18256 from overleaf/rd-a11y-form
[web] Create accessibility survey link on the project dashboard

GitOrigin-RevId: 49503da67347c9e0e15a10f041252f25f0effc15
2024-05-15 08:05:28 +00:00
ilkin-overleaf
482bd7fb9c Merge pull request #18103 from overleaf/ii-bs5-forms
[web] Bootstrap 5 form elements

GitOrigin-RevId: 7d031bed07007d0aa00a43f06d25bfb7384dee87
2024-05-15 08:05:11 +00:00
Antoine Clausse
9419cc3b37 [web] Add tests to collect_paypal_past_due_invoice.js + update logging (#18310)
* Fix: Invoices collected array length comparison

Update the code with the correct condition to respect the intent of the previous implementation ("exit with non zero code when no invoicess were processed").
See 5476f39984

However, I'm not sure if erroring when no invoices are collected is actually what we want to do.

* Wrap `collect_paypal_past_due_invoice` script and export the function

* Fixup typo `accoutns`

* Log invoices collection data before throwing

* Add note: `handleAPIError` is silencing the errors

* Create a test on `collect_paypal_past_due_invoice`

* Replace `console.log` by `@overleaf/logger` (bunyan)

Our `console.warn` show up as Errors (in red) in GCP. For example the following is an error in GCP:
```
Errors in attemptInvoiceCollection with id=2693634 OError: Recurly API returned with status code: 400
```
https://github.com/overleaf/internal/blob/5476f39/services/web/scripts/recurly/collect_paypal_past_due_invoice.js#L9

---

Does it correctly set the levels as warnings if we use `@overleaf/logger`

GitOrigin-RevId: 37c8bdf4afd8cef4706700aafb44480ec8966a74
2024-05-15 08:04:46 +00:00
David
6718729087 Merge pull request #18318 from overleaf/dp-revert-secondary-email
Revert "Merge pull request #18139 from overleaf/dp-add-secondary-prompt-ui"

GitOrigin-RevId: d8af37a5c332ac21ddd4c85679553df0bda326f9
2024-05-14 08:04:11 +00:00
David
0630e96d49 Merge pull request #18139 from overleaf/dp-add-secondary-prompt-ui
Add UI for secondary email prompt

GitOrigin-RevId: 887b2c7f0047f19b605f03745f7dda83926ec70b
2024-05-14 08:04:01 +00:00
Jakob Ackermann
9ea6b2f8b1 Merge pull request #18252 from overleaf/jpa-refactor-for-flaky-test
[web] refactor background job for setting root doc automatically

GitOrigin-RevId: 719c010eb3e5b692908b7a6fea9d8522b9fc01b9
2024-05-09 08:05:23 +00:00
Jakob Ackermann
9c5eb9630b Merge pull request #18222 from overleaf/jpa-socket-io-mock
[web] replace socket.io-mock with simple EventEmitter based interface

GitOrigin-RevId: 012e4263367a83e16efea3947f310a2de9a65279
2024-05-09 08:05:14 +00:00
Jessica Lawshe
c6b88085d5 Merge pull request #18188 from overleaf/jel-react-group-invite
[web] Migrate team invite to React

GitOrigin-RevId: 32e968c3b512020aef9a396808c73a7b4859e6d1
2024-05-09 08:05:03 +00:00
Alf Eaton
c1c098e2f9 Allow files to be dragged from the file tree into the editor (#15028)
GitOrigin-RevId: f926666c032d1398a0e3f72a298116a3c7a9cd75
2024-05-09 08:04:46 +00:00
Alf Eaton
cb297e342a [visual] Improve handling of pasted lists (#14912)
GitOrigin-RevId: 15e91ef6807433c5fb0a9bedbd5fea42ac35a5f0
2024-05-09 08:04:42 +00:00
David
0c20c86878 Merge pull request #18178 from overleaf/dp-insert-figure-translations
Add translations for insert figure dropdown

GitOrigin-RevId: 6ffbf0229f7ac222619271688517bc50339c10f6
2024-05-06 08:04:16 +00:00
Alf Eaton
9729befe59 Merge pull request #18170 from overleaf/ae-token-access-page
Convert token access page to React

GitOrigin-RevId: d7434f0de395c47a95d00767727fbe9d43f9abca
2024-05-03 08:05:01 +00:00
Alf Eaton
ab5495023a [visual] Add support for description list environments (#13460)
GitOrigin-RevId: d1ddfeed4ba453afa348e57d75fdb3e12d29f5fc
2024-05-03 08:04:53 +00:00
Jakob Ackermann
4c49841637 Merge pull request #18153 from overleaf/jpa-validate-session-in-store
[web] check for redis connection being out of sync in session store

GitOrigin-RevId: c271e88d4e1fbcb0f7a57f4775e8ef88b70b16a8
2024-05-03 08:04:25 +00:00
Jakob Ackermann
0576e02127 Merge pull request #18152 from overleaf/jpa-stricter-session-validation
[web] stricter session validation

GitOrigin-RevId: 3ef916318fde7f31e3e3fd0f7082dde7a2975a27
2024-05-03 08:04:20 +00:00
Jessica Lawshe
ae0abd6445 Merge pull request #18159 from overleaf/jel-group-invite-header
[web] Break word on group invite header

GitOrigin-RevId: 790c24e8291f1dbdfa9231e4c9e3d4e531bf2b8f
2024-05-02 08:03:52 +00:00
Antoine Clausse
a26c655220 Delete 3 migration scripts for compile-timeouts (#18163)
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 2d66052994159b6d902b807f02488095d65562e1
2024-05-01 08:05:00 +00:00
Antoine Clausse
6a6f155029 [web] Use React hooks to get split-test variants instead of getSplitTestVariant (getMeta) (#18133)
* Fix split-tests loading in React component: use `useSplitTestContext` instead of `getSplitTestVariant`

* Replace use of `isSplitTestEnabled` by `useSplitTestContext`

* Add SplitTestProvider to roots, and fix tests

* Create `useFeatureFlag` hook

* Use `useFeatureFlag` where applicable

GitOrigin-RevId: 9ff7bb3975d50bc4d07d74d93c482d56dc96f615
2024-05-01 08:04:55 +00:00
Andrew Rumble
9c3d9ef590 Merge pull request #17935 from overleaf/ar-refactor-compile-async
[web] make CompileManager async

GitOrigin-RevId: 617bde1f429fa9aafc7d4bf4ec628b2a22386b19
2024-04-30 08:04:43 +00:00
Antoine Clausse
cdd79e8ec0 Fix: unset recent users featuresUpdatedAt after wrong update (#18149)
* Copy previous script

* Remove `featuresUpdatedAt` that was wrongly set on recent users

* Fix! `signupDate` -> `signUpDate`

* Add test on `migration_compile_timeout_60s_to_20s_fixup_new_users.js`

* style: `$unset: { featuresUpdatedAt: 1 }` -> `$unset: { featuresUpdatedAt: '' }`

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

* Add comment on test (https://github.com/overleaf/internal/pull/18149#discussion_r1582999534)

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

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 408f5c7d48e60722aba736167b8e8858e9570d99
2024-04-30 08:04:33 +00:00
Antoine Clausse
711d50a2f1 [web] Create script to update forgotten featuresUpdatedAt after the migration to 20s compile timeout (#18113)
* Copy `migration_compile_timeout_60s_to_20s.js` script

* Update `featuresUpdatedAt`

* Add a comment about `featuresUpdatedAt` in migration_compile_timeout_60s_to_20s.js

* Fix test on migration_compile_timeout_60s_to_20s.js

* Fix: Include users having `featuresUpdatedAt` undefined in the update

* Add test on `migration_compile_timeout_60s_to_20s_fixup_features_updated_at`

GitOrigin-RevId: 4b2baf955a6a9f39bf9ce00b7839af551064c6cb
2024-04-30 08:04:28 +00:00
Brian Gough
29105911c5 Merge pull request #17732 from overleaf/bg-session-mitigation-initial-protoype
anonymous cookie-based sessions module

GitOrigin-RevId: 75fe2d48fa384ba8d07c0b478a9a5a907a2b3b67
2024-04-26 08:04:54 +00:00
Jakob Ackermann
a540754f6e Merge pull request #18116 from overleaf/jpa-bulk-replace-localhost
[misc] bulk replace localhost with 127.0.0.1

GitOrigin-RevId: d238f3635302e8ff5500d611108c4d1bef216726
2024-04-26 08:04:39 +00:00
David
c2448ff3d2 Merge pull request #17947 from overleaf/dp-secondary-email-confirmation-code
Add endpoints for secondary email confirmation by code

GitOrigin-RevId: c2829672fd9aeca457f76958d4922b9c95086f26
2024-04-26 08:04:00 +00:00
Jessica Lawshe
8d1885cd50 Merge pull request #18073 from overleaf/jel-sso-disabled-email-alert
[web] Send SSO disabled email to non-managed and linked users

GitOrigin-RevId: d5e6739efd432b396dcd7fa3dd37e18d2b9dc933
2024-04-25 08:05:30 +00:00
Jessica Lawshe
0b86bc04ad Merge pull request #18045 from overleaf/jel-user-settings-sso-groups
[web] Use `getUserGroupsSSOEnrollmentStatus` helper

GitOrigin-RevId: 4846d513964a63afb620ee2dbb5b810dd0aa4e60
2024-04-25 08:05:22 +00:00
Jessica Lawshe
a815ba6e5c Merge pull request #17912 from overleaf/jel-sso-enroll-after-login
[web] Redirect to group SSO enrollment page after log in

GitOrigin-RevId: 4c0937de6f009cd6e7e094569eb9ad46606a763b
2024-04-25 08:05:10 +00:00
Jessica Lawshe
94e9456a4b Merge pull request #17793 from overleaf/jel-password-token-when-managed-linked
[web] Check permissions when using password reset token

GitOrigin-RevId: b5339d5ad5322fcae7beaa99fb40a87ffb938b52
2024-04-25 08:04:58 +00:00
Alf Eaton
a697f9e7b0 Disable the file tree "create file" name input while a request is in flight (#18001)
GitOrigin-RevId: ef505220e8cff1dce4c84483edacd96cc87bb1aa
2024-04-25 08:04:33 +00:00
ilkin-overleaf
1e7053cb8e Merge pull request #17921 from overleaf/ii-bs5-alert-continue
[web] Replace all alerts with notifications in settings page

GitOrigin-RevId: a05755c39d2e54b3f57ffa589885e3e96aee00dc
2024-04-24 08:04:35 +00:00
Mathias Jakobsen
5aee58c6f4 Merge pull request #17956 from overleaf/mj-web-promisify-restore-manager
[web] Promisify RestoreManager

GitOrigin-RevId: cd3395f8cb7b90e19828297e1c89c1d3850877a6
2024-04-24 08:04:26 +00:00
Alf Eaton
45ee8aca93 [visual] Handle Enter in an empty list item at the end of a nested list (#18034)
GitOrigin-RevId: 4b3f24c7cf18837ba87859340991d9bb2532560a
2024-04-24 08:04:17 +00:00
David
ce00af7838 Merge pull request #18011 from overleaf/dp-make-_getRedirectFromSession-public
Make _getRedirectFromSession a public method

GitOrigin-RevId: 6538e4ec25e607d32beb944370d151d4f1a3709c
2024-04-24 08:04:13 +00:00
Alf Eaton
98cefaa5bd Remove "upgrade to annual" page (#18014)
GitOrigin-RevId: b9f92ad038adab7fc7eb5e2a7175461bfefee379
2024-04-24 08:04:04 +00:00
Alexandre Bourdin
1336b2daeb Merge pull request #18058 from overleaf/ab-split-test-convert-race-cond-fix
[web] Prevent failure due to race condition where converting anon assignments

GitOrigin-RevId: 81eb16689724b9ddc2ec7e23df2c3ea55837b83c
2024-04-23 08:05:54 +00:00
Alf Eaton
cca569e22c Allow read-only users to close the review panel (#18040)
GitOrigin-RevId: 93a470152da6dd215db07e3060621f32e5ae701d
2024-04-23 08:05:35 +00:00
Alexandre Bourdin
9fc6fa9b77 Merge pull request #18017 from overleaf/ab-convert-assigned-at-date
[web] Transform assignedAt back to date for conversion

GitOrigin-RevId: bd0213b337f765d8512386f9f5d3fc6d03572e33
2024-04-23 08:04:52 +00:00
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
ilkin-overleaf
cccd0f06d7 Merge pull request #17908 from overleaf/ii-bs5-badge
[web] Create Bootstrap 5 badges

GitOrigin-RevId: 72355c7cf7dca2a5d16bc890d7cfa4a432dd15ba
2024-04-22 08:04:07 +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