Commit graph

279 commits

Author SHA1 Message Date
Tim Down
0778bab910 Merge pull request #27254 from overleaf/td-project-dashboard-cookie-banner
Implement React cookie banner on project dashboard

GitOrigin-RevId: 95d2778d7ce7cb3054a06b06486b815a3453a623
2025-07-22 08:06:05 +00:00
Domagoj Kriskovic
d5b5710d01 Add docModified hook in ds-mobile-app module (#27196)
* Add docModified hook in ds-mobile-app module

* use Object.entries when iterating over promises

* avoid project lookup

* update tests

GitOrigin-RevId: 88676746f56558a97ce31010b57f5eeb254fefef
2025-07-22 08:05:56 +00:00
Andrew Rumble
5d79cf18c0 Define all initial roles
GitOrigin-RevId: ad613bad4d8a47e327281e90b5475e989a3ccec4
2025-07-22 08:05:42 +00:00
Antoine Clausse
cf668d897d [web] Create middleware and functions for checks on admin permissions (#27107)
* Create AdminCapabilities in admin-panel module

* Add `adminRolesEnabled` setting

* Use `PermissionsController.requirePermission` in admin-panel routes

* Update `adminCapabilities` to be an array

* Update frontend tests

* Rename `defaultAdminCapabilities` to `fullAdminCapabilities`

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

* Add tests to PermissionsManagerTests.js

* Get admin roles and capabilities from the database

* Add tests to admin-panel

* Fixup PermissionsManagerTests.js without admin-panel module

* Revert "Use `PermissionsController.requirePermission` in admin-panel routes"

This reverts commit ccbf3e3e3bca9239b786c662cba2ac6bd2f4117a.

* Revert "Fixup PermissionsManagerTests.js without admin-panel module"

This reverts commit 6d7ad207bb17c5ca4c12c489d4636a02c608926d.

* Revert "Add tests to PermissionsManagerTests.js"

This reverts commit 8f9cc911750911e1c4b74b631d8c8a1b1ca86630.

* Fix tests after the reverts

* Replace capabilities to more sensible examples ('modify-user-email' and 'view-project')

* Set `adminRolesEnabled: false` for now

* Return `[]` capabilities for non-admins

* Misc: types, test description, settings ordering

* Small refactor of AdminPermissions.mjs:

Reuse code with `getMissingCapabilities`
Throw when `requiredCapabilities` is empty

* Update tests after update

* Rename `checkAdminPermissions` to `hasAdminPermissions`

* Change role permissions to array instead of object

* Remove admin capabilities when `!Settings.adminPrivilegeAvailable`

* Return `[]` if there is no user id

* Throw if `user?._id` is missing

* Update services/web/modules/admin-panel/app/src/AdminPermissions.mjs

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

* Adjust to ForbiddenError constructor syntax

* Give empty capabilities for unknown role, update tests

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 1eec4f6a45e1cc3ae76a3a4603cec1ceba1c2322
2025-07-18 08:06:40 +00:00
Jessica Lawshe
524402e817 Merge pull request #26603 from overleaf/jel-domainCaptureEnabled
[web] Add admin toggle for setting `domainCaptureEnabled` feature for groups

GitOrigin-RevId: d116a493402f39c06b3267bf5294ed90ed3e762d
2025-07-15 08:06:23 +00:00
Antoine Clausse
10f4722641 [web] Add some types to web module (#27051)
* Update `WebModule` types

* Add `if (module.middleware)` so types are satisfied

GitOrigin-RevId: 875fa2710a65d557037771c3eb76ff3cb0e73429
2025-07-15 08:05:34 +00:00
Antoine Clausse
4c03ebe4ee [web] Add some types for existing capabilities and PermissionController (#27048)
* Add types on existing Capabilities code

* Add ts-expect-error comments

* Minor code changes to satisfy types

* Remove ts-check because of unrelated errors

* Remove some ts-expect-error comments

* Revert "Remove some ts-expect-error comments"

This reverts commit 76cc0a073710eecf4f8b88f8579405838607f4d5.

* Remove the `@ts-check`s for now

It looks like typescript is somewhat flaky. We can re-enable this later

* Remove the `@ts-expect-error`s

* Remove return type

GitOrigin-RevId: 57bbd370654592c0662047e72e61f91bf38e0949
2025-07-15 08:05:29 +00:00
M Fahru
028d4b481f Merge pull request #26965 from overleaf/mf-trials-convert-to-regular-should-not-send-subscription-renewed
[web] Stop sending any event when trial changes to active for Stripe subscription on `customer.subscription.updated` stripe webhook event type

GitOrigin-RevId: 11256878cd2828036aad3130a05ad36d95466199
2025-07-11 08:06:50 +00:00
M Fahru
16f3795c3e Merge pull request #25962 from overleaf/mf-stripe-payment-page-form-success-event
[web] Simulate sending `payment-page-form-success` event when user successfully subscribe using Stripe

GitOrigin-RevId: 82243fc16d3410670e4e6e9c0ccd487a5f2253a3
2025-07-08 08:07:20 +00:00
M Fahru
b3c339464e Merge pull request #25911 from overleaf/mf-stripe-payment-page-form-submit-event
[web] Simulate `payment-page-form-submit` event for Stripe subscription

GitOrigin-RevId: 8cfa1a2d91aaea4314a4a40f3256bade50507084
2025-07-08 08:07:16 +00:00
Mathias Jakobsen
913caca379 Merge pull request #26850 from overleaf/mj-chat-deleted-user
[web] Handle deleted users in chat threads

GitOrigin-RevId: 6593bf37e4f2339b40069b7cf4198166660852fb
2025-07-08 08:06:17 +00:00
Alexandre Bourdin
36c4c65609 Merge pull request #26683 from overleaf/ab-update-survey-form
Update survey form and preview + support custom button CTA

GitOrigin-RevId: 2b519ab1da1c8e7897b3135956f80619f4e901b4
2025-07-03 08:05:26 +00:00
Tim Down
ebb2cff2af Merge pull request #26697 from overleaf/td-custom-logo-sp
Restore custom logo feature on SP project dashboard

GitOrigin-RevId: c3ceafa8756968bfbb92f3fca22889e11a39dc40
2025-07-02 08:06:01 +00:00
Kristina
f7a68cb503 Merge pull request #26641 from overleaf/kh-use-stripe-us-client
[web] use Stripe US client

GitOrigin-RevId: 9b99ba8c7ac900c528526cf7e18fec48761e0091
2025-06-30 08:06:02 +00:00
Kristina
3bdc8316e9 Merge pull request #26639 from overleaf/kh-support-stripe-us
[web] support regional Stripe accounts

GitOrigin-RevId: d414d310d8db495635d8e0d3b057e3f56b2f044e
2025-06-30 08:05:57 +00:00
Antoine Clausse
00d5d879c5 [web] Add third-party tracking Propensity (#26638)
* 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
2025-06-30 08:05:52 +00:00
Mathias Jakobsen
4fd9c6fd18 Merge pull request #26440 from overleaf/mj-ide-co-branding-submit
[web] Editor redesign: Add co-branded submit button to toolbar

GitOrigin-RevId: 45f7ba93de8b28868d88a4ad913f6543e0f7e0a6
2025-06-26 08:05:10 +00:00
Jessica Lawshe
91a308a62f Merge pull request #25868 from overleaf/jel-group-sso-ukamf-endpoints
[web] Option to use UKAMF path for group SSO

GitOrigin-RevId: 117fca5913682a02e9f8e8442eed13568f6551a1
2025-06-19 08:06:21 +00:00
Antoine Clausse
494f0a4b1a [web] Rename docRoot_id to docRootId in the frontend code (#26337)
* Rename `rootDoc_id` to `rootDocId` in the frontend

* Update types

* Fix frontend test

GitOrigin-RevId: b755a4ebf7b8c0b8ed800d713bbae8cfcfdd5046
2025-06-18 08:07:05 +00:00
Antoine Clausse
3ba002460e [web] Remove instances of $scope and _ide (#26297)
* Remove `$scope` from `getMockIde`

* Replace `...getMockIde()` by `_id: projectId`

* Simplify stories decorator scope.tsx: less reliance on `window`

* Update helper editor-providers.jsx: pass data instead directly instead of using `window`

* Remove `cleanUpContext`

* Remove unused prop `clsiServerId`

* Update types to reflect unused properties

* Remove comment

* Add `ol-chatEnabled` in Storybook

* Revert moving `getMeta` outside of the component

This causes issues in Storybook

GitOrigin-RevId: dc2558ce814c2d738fb39450c57c104f4419efb8
2025-06-18 08:06:42 +00:00
Kristina
6b38336c7b Merge pull request #26397 from overleaf/kh-use-new-price-lookups
[web] use new price lookup keys

GitOrigin-RevId: f4c077d946100862aaea0288d5035a34d6188e83
2025-06-17 08:05:51 +00:00
Kristina
53fc78d83e Merge pull request #25771 from overleaf/kh-pass-locale-to-checkout
[web] pass locale and currency to Stripe checkout

GitOrigin-RevId: 410cde4849226a70c5a6b295554d96984f48f9fb
2025-06-16 08:05:51 +00:00
Kristina
7a449f4686 Merge pull request #26014 from overleaf/kh-remaining-references-to-recurly-fields
[web] update remaining references to `recurlyStatus` and `recurlySubscription_id`

GitOrigin-RevId: f5e905eba598cfcd146803c6ccc36a2304021544
2025-06-09 08:05:17 +00:00
Kristina
a8df91e91b Merge pull request #26087 from overleaf/mf-change-to-stripe-uk
[web] Configure to use Stripe UK account

GitOrigin-RevId: 0856f6da2caae8caf9887ec2acea8e7f0972e598
2025-06-09 08:05:09 +00:00
M Fahru
ca10904484 Merge pull request #26027 from overleaf/mf-admin-panel-stripe
[web] Update admin panel with Stripe subscription data

GitOrigin-RevId: fc4f773c5d6d2eae206a791c1ad40d8ccbf766e7
2025-06-05 08:05:58 +00:00
Kristina
a134a2b799 [web] support purchasing/removing add-ons for Stripe subscriptions (#26081)
GitOrigin-RevId: 01c2eaccc7c34bc37be43120de83270490e5e6da
2025-06-05 08:05:06 +00:00
Eric Mc Sween
f11ea06c1a Merge pull request #25910 from overleaf/em-track-changes-sharejs
Track changes in the history OT sharejs doc

GitOrigin-RevId: 17365219f24a25790eac611dbde9681eb73d0961
2025-06-04 08:07:50 +00:00
roo hutton
a63e25953f Merge pull request #25896 from overleaf/rh-load-odc-data
Load ODC data when revisiting onboarding form

GitOrigin-RevId: 506df5d58a8b0305d83b9f43986a55fd309a2720
2025-06-04 08:05:42 +00:00
Mathias Jakobsen
da449f9f5f Merge pull request #26015 from overleaf/mj-ide-breadcrumbs-setting
[web] Add setting to control editor breadcrumbs

GitOrigin-RevId: 6e0a4bb97eba63a1df43d85840f8962bf0238b7c
2025-06-03 08:05:49 +00:00
Jessica Lawshe
ce67a27c97 Merge pull request #25556 from overleaf/jel-group-audit-log-remove-from-group
[web] Log when user leaves or is removed from group

GitOrigin-RevId: 8a5042b21cbf4eb622d5ca35cc095d94fe5a8539
2025-05-28 08:05:53 +00:00
M Fahru
0e54e650e3 Merge pull request #25706 from overleaf/mf-tear-down-nudge-annual-checkout-page
[web] Tear down `nudge-annual-checkout-page` split test and keep the default version

GitOrigin-RevId: 5714810b2a8abedca60855b37b059cd7f900407c
2025-05-21 08:06:16 +00:00
M Fahru
6a73d3f8f3 Merge pull request #25705 from overleaf/mf-add-journal-grey-sticker
[web] Add `journal-grey.svg` sticker in Contentful

GitOrigin-RevId: 713ba7ef1e2589eecb9b93081d31a79464172850
2025-05-21 08:06:07 +00:00
M Fahru
7a0a6077cf Merge pull request #25692 from overleaf/mf-add-stickers-cms
[web] Add pen-yellow and support-green sticker in contentful

GitOrigin-RevId: 26beffd1bf75f9fdf1dba5b8e93b1190a642ff6d
2025-05-19 08:05:33 +00:00
M Fahru
1440a47d53 Merge pull request #25560 from overleaf/mf-stripe-analytics-invoice-event
[web] Handle stripe analytics for the `subscription-invoice-collected` event

GitOrigin-RevId: cba56db820cac92a66307a05350c779e1198cbf3
2025-05-16 08:07:16 +00:00
M Fahru
81dd3c10a7 Merge pull request #25497 from overleaf/mf-send-subscription-renewed-event-stripe
[web] Send analytics events and user properties when user's subscription is renewed with the same plan

GitOrigin-RevId: c21436d942e8b1a2b8c9fca5827826bf0e8b8bdb
2025-05-16 08:07:12 +00:00
M Fahru
8017918063 Merge pull request #25490 from overleaf/mf-send-subscription-cancelled-and-reactivated-event-stripe-subscription
[web] Send analytics events and user properties for cancelled and reactivated event in Stripe subscription

GitOrigin-RevId: 07a4e6395be334c90910b5d421624c4daa703d3b
2025-05-16 08:07:04 +00:00
M Fahru
75ce58d0c6 Merge pull request #25404 from overleaf/mf-send-subscription-analytics-events
[web] Send analytics events and user properties when user start subscription using Stripe

GitOrigin-RevId: 9028397a5cb256df506e14beb1705191c9ae3f7f
2025-05-16 08:06:57 +00:00
David
8d940ad841 Merge pull request #25387 from overleaf/dp-editor-toolbar-proptypes
Remove proptypes from editor-navigation-toolbar components

GitOrigin-RevId: 77a1c4e13e3da6c06bb515b0137da2f70bfdf4a8
2025-05-13 08:08:06 +00:00
Jimmy Domagala-Tang
bf22684e2d Merge pull request #25507 from overleaf/jdt-show-wf-src-on-admin
Add premium source for Writefull entitlment to the Admin page

GitOrigin-RevId: 937b6d588d0f9328eb450809a0cd2f0e4b0ea299
2025-05-13 08:07:03 +00:00
Kristina
70c26b6ed2 [web] prevent downgrade to personal upsell for stripe subscriptions (#25392)
GitOrigin-RevId: a954f42e1159e4bcc8fd06f5f6df9a53c67f9f90
2025-05-13 08:06:05 +00:00
Liangjun Song
caf8b5c3c5 Merge pull request #25329 from overleaf/ls-enable-stripe-checkout-for-group-plan
Enable stripe checkout for group subscriptions

GitOrigin-RevId: 10a579ebca789773bd2c94f8240b7b979b6e8eb0
2025-05-13 08:05:32 +00:00
M Fahru
5ba31ab14f Merge pull request #25363 from overleaf/mf-stripe-webhook-delete-subscription
[web] Delete "expired" subscription in Stripe (in Stripe, this is called "canceled" status)

GitOrigin-RevId: 847cf431c2f6edd7ec6c4e17137d163e450dc4f1
2025-05-09 08:06:26 +00:00
ilkin-overleaf
2ccdb74d20 Merge pull request #25318 from overleaf/ii-flexible-licensing-manually-collected-3
[web] Add seats feature for manually collected subscriptions improvements

GitOrigin-RevId: 4fbd93097590d97ad6464d1988471a78bf7cb9e2
2025-05-09 08:05:07 +00:00
M Fahru
661aa20c09 Merge pull request #25288 from overleaf/mf-stripe-webhook-subscription-updated
[web] Handle `customer.subscription.updated` stripe webhook event type

GitOrigin-RevId: 821baee5d5a45b92ee7bce47598a5e3ea5aa95ea
2025-05-07 08:07:44 +00:00
M Fahru
6c3cc794a4 Merge pull request #25161 from overleaf/mf-stripe-webhook
[web] Implement stripe webhook for `customer.subscription.created` event type

GitOrigin-RevId: f32e7607ddf900211efbe487bcd1f09172100178
2025-05-07 08:07:39 +00:00
Jakob Ackermann
5ce1685b5b [clsi-cache] shard each zone into three instances (#25301)
* [clsi-cache] shard per zone into three instances

Keep the old instance as read fallback. We can remove it in 4 days.

Disk size: 2Ti gives us the maximum write throughput of 240MiB/s on a
N2D instance with fewer than 8 vCPUs.

* [clsi] fix format

* [k8s] clsi-cache: bring back storage-classes

* [k8s] clsi-cache: fix reference to zonal storage-classes

* [k8s] clsi-cache: add logging configs

* [clsi] improve sharding

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

* [clsi] fix sharding

Index needs to be positive.

* [clsi] fix sharding

The random part is static per machine/process.

* [clsi] restrict clsi-cache to user projects

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

* [k8s] clsi-cache: align CLSI_CACHE_NGINX_HOST with service LB

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 1efb1b3245c8194c305420b25e774ea735251fb3
2025-05-07 08:06:16 +00:00
ilkin-overleaf
1a8c549389 Merge pull request #24412 from overleaf/ii-flexible-licensing-manually-collected-2
[web] Add seats feature for manually collected subscriptions

GitOrigin-RevId: f7cc6f8ce17163f10e175a06bb471de6e3a96e3c
2025-04-30 08:05:00 +00:00
Kristina
23c1a0ba4d Merge pull request #25082 from overleaf/kh-prevent-pausing-and-group-plans
[web] prevent pausing or upgrading to group for Stripe subscriptions

GitOrigin-RevId: 4d194339282d8bc165ffa1b89e8e1cf298c2d343
2025-04-29 08:05:09 +00:00
Kristina
6f1f1ba744 Merge pull request #24848 from overleaf/mf-save-stripe-checkout-data-to-mongo-db
[web] Save stripe checkout data to mongodb

GitOrigin-RevId: 537778a041f92f43ccf6455c29a56c7a961ce765
2025-04-24 08:05:40 +00:00
Jimmy Domagala-Tang
b225b55e8d Merge pull request #24990 from overleaf/dk-paywall-modal-updates
Updates to AI assist interstitial modal

GitOrigin-RevId: d2365aaf36f1f61a39a0bd52357f4518736e2a7d
2025-04-23 08:05:35 +00:00