Commit Graph

2527 Commits

Author SHA1 Message Date
Antoine Clausse 1b0b99e12e [web] Add unlinking third-party logins ability from the admin-panel (#28201)
* Add `clearThirdPartyLogins`

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* Add a confirmation modal

* Show provider name from settings

* Replace "logins" by "identifiers" for consistency with current terminology

* Hide button if user has no third-party identifiers

* Update tests

* Add test "unlinks Google account"

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 45b9b5ce6fa2cbeba9d4daeda97cd6e500c8266c
2025-09-05 08:05:12 +00:00
Antoine Clausse 86e74b9228 [web] Update admin permissions to view/modify project contents (#28162)
* Split capability definitions `modify-project`/`view-project` into `modify-project-content`/`modify-project-setting`/`view-project-content`/`view-project-setting`

* Add admin capabilities check in AuthorizationManager

* Update checks in router

* Update frontend checks

* Remove UI elements for admins without `view-project-content`

* Update tests

* Remove `modify-project-content` from the roles' capabilities

* Update tests

* Add "with admin roles" tests in AuthorizationTests.mjs

GitOrigin-RevId: 3311bcb2da792968927b5b3703b24e069d0baf5b
2025-09-05 08:05:08 +00:00
Jakob Ackermann 16422f972b Merge pull request #28265 from overleaf/jpa-double-compile
[web] add c2d -> c4d double compile test

GitOrigin-RevId: 186cfa867d3db5786c6d4888dfe1ca2f46a5bb0c
2025-09-04 08:05:10 +00:00
Jakob Ackermann 03320bb377 Merge pull request #28264 from overleaf/jpa-synctex
[web] use standard request handling for SyncTeX requests

GitOrigin-RevId: ad5ba1834241d5939675f2533940ade741fc5abf
2025-09-04 08:05:06 +00:00
Jakob Ackermann a85b2b34f5 Merge pull request #28233 from overleaf/jpa-clsi-lb-clear
[web] clear clsi server id/output files in both clsi-lb backends

GitOrigin-RevId: b73ccc2017800d9abbb8f571efeb34f51c9f96c1
2025-09-04 08:04:58 +00:00
Andrew Rumble 85b517f7f4 Coerce strings when sending a Group Sub add users sales request
GitOrigin-RevId: d935d43ed35996d3979854b5368ccc283c58b58a
2025-09-03 08:07:16 +00:00
Eric Mc Sween 4eeefbeaaf Migrate pauseSubscription to zod
GitOrigin-RevId: 9c5237f151c84e37dc744c61cc4fa10762cf9ed1
2025-09-03 08:07:06 +00:00
Eric Mc Sween 25d6bb85cc Migrate removeAddon to zod
GitOrigin-RevId: 957781aaec8b6610b6d7944c24d4755c50c923a1
2025-09-03 08:07:01 +00:00
Eric Mc Sween 4797ca035c Migrate purchaseAddon to zod
GitOrigin-RevId: 532b2f3b04dc9ef7b149a4caaa62fe8495d78622
2025-09-03 08:06:57 +00:00
Eric Mc Sween 8b518d07ff Migrate group submit form to zod
GitOrigin-RevId: c6cd882e6446730ad6a4b165871eb3148bd2fb16
2025-09-03 08:06:52 +00:00
Eric Mc Sween 5526a094bc Migrate group user add to zod
GitOrigin-RevId: bd6beb6b4eb68825f6b382dd5c7e3257897cb4ef
2025-09-03 08:06:47 +00:00
Mathias Jakobsen ed0c4c447e Merge pull request #24468 from overleaf/mj-client-side-references
[web] Perform ARS on client-side

GitOrigin-RevId: 19703c82758cae450fe52463ad9612d3a2383ba0
2025-09-03 08:05:41 +00:00
Domagoj Kriskovic c984134142 Open selected file on project restore (#28145)
* Open selected file on project restore

* check if restorationState is "restoring" before opening a file

GitOrigin-RevId: c6f4cf69ecbe55b1d1949e4524fe7e39737c5487
2025-09-03 08:05:30 +00:00
roo hutton 3a7a7c8281 Merge pull request #28200 from overleaf/rh-trial-extension-fix
Fix calculation of extended trial renewal date

GitOrigin-RevId: 3a73b4bba37ebcccfc80d123a1a6e6c286320571
2025-09-02 08:05:21 +00:00
Mathias Jakobsen 2747d494bc Merge pull request #28208 from overleaf/mj-compile-events-draft
[web] Add draft mode to compile event segmentation

GitOrigin-RevId: 3dfc460da43e0164c7a1902cc841cc490bcfe591
2025-09-02 08:05:01 +00:00
Jakob Ackermann bd4130c147 [filestore] remove user files endpoints (#28125)
* [filestore] remove user files endpoints

* [web] remove user files integration for filestore

GitOrigin-RevId: 565fa68a659c07420ee6141d0f276b4e4d2972e0
2025-09-02 08:04:52 +00:00
Antoine Clausse 294fb94431 [web] Fix metrics pages membership middleware (#28194)
GitOrigin-RevId: c41c117e6999ee5ea202516e72f4d22c32a07668
2025-09-01 08:05:08 +00:00
Eric Mc Sween ecc0d603e2 Merge pull request #28163 from overleaf/em-dsmp-event-names
Make DSMP event names consistent

GitOrigin-RevId: 5a98b00fb9c1049259291f1abb6ff74eac337ef4
2025-08-29 08:06:51 +00:00
Simon Gardner 4cc07da294 Improve display of generic SAML errors
GitOrigin-RevId: 60096874480c268be52faddd96ebdf870bdf0a64
2025-08-29 08:06:32 +00:00
roo hutton 467102fd1b Merge pull request #27643 from overleaf/rh-pause-cancel
Terminate Recurly subscription when cancelling during final month of pause

GitOrigin-RevId: 39e4c9534621f57b3e2783599ebe521959d7401f
2025-08-29 08:06:17 +00:00
Eric Mc Sween 27230aa017 Handle zod errors in global error handler
GitOrigin-RevId: 2e23067b3af3178864064bc595c97a18e901ea60
2025-08-29 08:05:34 +00:00
Andrew Rumble 42f3bd208b Log error on web service start when hashedEmailSalt not set
GitOrigin-RevId: 67473de85d869b56aa1321391b03ddcceb95346b
2025-08-29 08:05:25 +00:00
Andrew Rumble eb737c7a98 Register email changes with analytics when appropriate
GitOrigin-RevId: 3261df7f1fd4a2c032967731bcc2a61ffb89f094
2025-08-29 08:05:21 +00:00
Andrew Rumble cfbfcbc5db Add helper functions for creating change events
GitOrigin-RevId: 26a4cbc8e322c52e12cd3eb7f891d9914cefc70d
2025-08-29 08:05:17 +00:00
Andrew Rumble ae504e8af5 Add AnalyticsManager function for registering email changes
GitOrigin-RevId: ad42703fdc186936866b44c47492e3f653658f4f
2025-08-29 08:05:12 +00:00
Liangjun Song 9a7bc564c1 Merge pull request #28110 from overleaf/ls-handle-manual-subscription-on-add-on-purchase-page
Handle manual subscription on AddOn purchase page

GitOrigin-RevId: 54281d3471d7c2b60d333e6264904b3744156138
2025-08-28 08:06:42 +00:00
Liangjun Song 3adf77994b Merge pull request #28071 from overleaf/ls-add-logic-to-sync-ol-to-stripe-subscription-mapping
Add logic to sync INT_account_mapping and backfill script

GitOrigin-RevId: 585a3945e6f238ca345c639218ef8bd3d588a31f
2025-08-28 08:06:37 +00:00
Miguel Serrano 8948e40b22 Revert "Merge pull request #27679 from overleaf/msm-aws-sdk-upgrade" (#28151)
This reverts commit 4989ae920d8b7fd9e79623947b7c40bcc2e56d92.

GitOrigin-RevId: 541d95bfeaa7ce820e8af67f646f013fe4fe5d21
2025-08-28 08:05:52 +00:00
Miguel Serrano 39381d808a Merge pull request #27679 from overleaf/msm-aws-sdk-upgrade
Upgrade `aws-sdk` to v3

GitOrigin-RevId: 4989ae920d8b7fd9e79623947b7c40bcc2e56d92
2025-08-28 08:05:36 +00:00
Antoine Clausse ed4a863cd3 [web] Update UserMembershipMiddleware with flexible requireEntityAccess (#28018)
* Update `requireGroupSettingsReadAccess` to be available to all admins when adminRolesEnabled is true

* Update `UserMembershipMiddleware` with a flexible `requireEntityAccess` method

* Update `UserMembershipMiddleware` further

Update endpoints permissions when admin roles are enabled:

`GET /manage/groups/:id/audit-logs` -> view-audit-log
`GET /manage/groups/:id/audit-logs/zip` -> view-audit-log
`GET /manage/groups/:id/settings` -> all admins
`GET /subscription/:id/sso_configuration_test` -> all admins
`GET /manage/groups/:id/members` -> all admins
`DELETE /manage/groups/:id/user/:user_id` -> `modify-group-member`/`modify-managed-group-member`
`GET /manage/groups/:id/members/export` -> all admins

* Update `requireEntityAccess` to parameters to an object

* Rename `hasAdminAccess` to `hasAnyAdminRole`

GitOrigin-RevId: 740ea5148edc50987fbc86607b1aaa7b7523ffcb
2025-08-28 08:05:31 +00:00
Domagoj Kriskovic e915003a61 Handle undefined rootDoc when restoring a file (#28118)
GitOrigin-RevId: f3aa32d2443f3fffbda8a10cc35d5dec3db71143
2025-08-27 08:05:43 +00:00
Domagoj Kriskovic 979059f74a [dsmp] Add resolve and reopen comment endpoints (#28093)
* [dsmp] Add resolve and reopen comment endpoints

* remove try/catch

GitOrigin-RevId: b2982de064e81a8fd7c19edbe114ae397e5f51d5
2025-08-27 08:05:35 +00:00
Domagoj Kriskovic cffad44264 Add support for handling deleted root document in RestoreManager (#28008)
* Skip opening root document if delete originated from a file-restore

* handle project-restore origin

* Refactor isFileRestore logic

* Add support for handling deleted root document in RestoreManager

GitOrigin-RevId: 837144aa6e269cbffebf82624f58e8219fe654c4
2025-08-27 08:05:30 +00:00
Eric Mc Sween fa9cea9f1d Merge pull request #28098 from overleaf/em-dsmp-chat-event
Send a DSMP event when a chat message is sent

GitOrigin-RevId: 062476676c91a4edf3d6f837d60ad16c7f912771
2025-08-26 08:05:36 +00:00
Eric Mc Sween e14d56ddb2 Merge pull request #28089 from overleaf/dk-dsmp-post-chat-message
Add support for posting chat messages

GitOrigin-RevId: 817d723abf6309716c4cfa61e2c260cb7ace0bda
2025-08-26 08:05:32 +00:00
Domagoj Kriskovic 8c3fe3bd31 [web] change the order when creating a memebers list in permissions checks (#28063)
GitOrigin-RevId: 73fd9218841d189dc95edec86f09d451005e6189
2025-08-26 08:05:13 +00:00
Eric Mc Sween bae0a88dcb Merge pull request #28077 from overleaf/em-promisify-chat-controller
Promisify ChatController

GitOrigin-RevId: c2af5f7bc24b1e6c682bb1dfd1146c3dcc90ae25
2025-08-25 08:05:42 +00:00
Domagoj Kriskovic f65f567380 Add getThread in Chat service and use it in AuthorizationMiddleware (#28041)
* Add getThread in Chat service and use it in AuthorizationMiddleware

* ensure user_id is a string, not ObjectId

* fix tests

GitOrigin-RevId: 42d63366b9b9350d7cdbcbc3b9f4761d9f55b49a
2025-08-25 08:05:25 +00:00
Jessica Lawshe 8212483da7 Merge pull request #27859 from overleaf/jel-domain-capture-create-new-user
[web] Create new group user via domain capture

GitOrigin-RevId: 2b8740edcfde05cf065564e87f50a9f84d14950a
2025-08-21 08:06:00 +00:00
Antoine Clausse af44f478b9 [web] Add admin permission modify-group-manager (#27642)
* Add capacity `modify-group-manager`

* Check `modify-group-manager` (backend)

* Check `modify-group-manager` (frontend)

* Update tests

* Rename AdminPermissions to mjs

* Add `ol-adminCapabilities` in frontend tests

* Allow modifying group managers if `adminRolesEnabled` is false

* Add `adminPrivilegeAvailable` check

* Update: set `ol-canModify` boolean instead of `ol-adminCapabilities`

* Mock `hasAnyAccess`

* Use `hasAdminCapability` helper

* Add `ol-canModify` to types

* Remove `isAdminMiddleware` as we don't want to relax the permissions for now

* Fix: pass `res` to `hasAnyAccess` (!!)

* * Check `hasWriteAccess` (`hasAdminCapability('modify-group-manager')` or `staffAccess.groupManagement`) in the Pug file
* Fix: Check `hasWriteAccess` in the publisher and institution pug files (!)
* Revert `hasAnyAccess` changes
* Rename `ol-canModify` to `ol-hasWriteAccess` for consistency with other variables

* Remove redundant file AdminPermissions.mjs

* Update unit test

* Revert changes to UserMembershipController.test.mjs

* Rename to `requireGroupManagersWriteAccess`

GitOrigin-RevId: f3f0b1b17abd1d2f0c363688e87d9063de886e3c
2025-08-21 08:05:07 +00:00
M Fahru aab4b06f03 Merge pull request #27998 from overleaf/mf-improve-plan-not-found-error-stripe
[web] Return user-readable error message if user visits stripe-based payment page with invalid plan code

GitOrigin-RevId: ad88a7d6698227867874fa0a724142e563d1377c
2025-08-20 08:06:29 +00:00
Jessica Lawshe 2389674cca Merge pull request #27894 from overleaf/ii-domain-capture-join-button
[web] Domain capture join button

GitOrigin-RevId: aec6033f6776e9384c77fe0ef609c65b13a90f87
2025-08-20 08:06:21 +00:00
Jessica Lawshe 1aef3acca9 Merge pull request #27834 from overleaf/ii-domain-capture-not-in-group-redirect
[web] Redirect to domain capture page

GitOrigin-RevId: 15d2b8046beb5a40fc4937c337ee9655abaed8fd
2025-08-20 08:06:16 +00:00
MoxAmber fc5ae92be1 Merge pull request #27677 from overleaf/as-compile-timeout-enforcement
[web] 10s Compile Timeout - Enforcement Phase

GitOrigin-RevId: 3930eb376cc1293409259e073032218e09d5270e
2025-08-20 08:06:01 +00:00
MoxAmber 86a1be9739 Merge pull request #27848 from overleaf/as-compile-warning-teardown
[web] Tear down 10s-timeout-warning split test

GitOrigin-RevId: ca8faf77bc73073e9fc126d9d722fe568921c1c3
2025-08-20 08:05:57 +00:00
Antoine Clausse 5373c84d9f [web] Add requireAdminRoles param to hasAdminCapability (#28006)
* Add `requireAdminRoles` param to `hasAdminCapability`

https://github.com/overleaf/internal/pull/27965#discussion_r2284808889

Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>

* Update test

---------

Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>
GitOrigin-RevId: 83f8af84debc70c7a2e294638747369c786be22f
2025-08-20 08:05:52 +00:00
Brian Gough f5dbbadf79 add option to disable link sharing (#27626)
* 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
2025-08-20 08:05:33 +00:00
Domagoj Kriskovic eac4a5cb13 Show Recurly's line items breakdown in subscription change preview (#27809)
* Show Recurly's line items breakdown in subscription change preview

* fix rounding, filter items that cancel each other out

GitOrigin-RevId: 0f5d71b3917ce8a52ff36608a6ec6280fe7d38ce
2025-08-19 08:05:02 +00:00
Antoine Clausse 40772ef819 [web] Add admin permissions modify-group-member and modify-managed-group-member (#27665)
* Add capability `modify-managed-group-member` & `modify-group-member`

* Check `modify-managed-group-member` & `modify-group-member` (backend)

* Check `modify-managed-group-member` & `modify-group-member` (frontend)

* Update tests

* Update with `ol-hasWriteAccess` flag

* Update tests

* Move functions to AdminAuthorizationHelper.js

* Update import to fix build error

* Add `ol-hasWriteAccess` to types

* Use `hasAdminAccess()` instead of `req?.user?.isAdmin`

* Add tests on `/manage/groups/:id/invites` depending on admin roles

* Reuse `UserMembershipAuthorization.hasAdminCapability`

* Fix: Add entityAccess check

* Update unit test

* Rename `hasAdminGroupMemberCapability` to `hasModifyGroupMemberCapability`

* Remove useless and redundant `hasWriteAccess` check

* Restore stub in afterEach

GitOrigin-RevId: 4b6d83751121b43d4c19d0dbd82a4833cf7a6f24
2025-08-15 08:05:57 +00:00
Antoine Clausse d49f0e28e3 [web] Add admin permission modify-group-setting (#27657)
* Add capacity `modify-group-setting`

* Check `modify-group-setting` (backend)

* Check `modify-group-setting` (frontend)

* Update tests

* Fix: Add entityAccess check

* Update unit test

GitOrigin-RevId: 7702fe34762ecb8bd050c2fa2b6e95a9baf90be3
2025-08-15 08:05:52 +00:00