Allow checking permissions for all users on a project and rename checkPermissions -> AssertPermissions
GitOrigin-RevId: 511356cf2fe68367e284347e68e59f6116bd0f80
Implement link sharing warning events by reusing the StartFreeTrial paywall button component from the original modal
GitOrigin-RevId: 9c16407ad8a7b5afc9b5b13be1491ef903ae74a3
* Add getEditInviteCount to count only edit collaborators
* Add getInvitedEditCollaboratorCount to count joined editors
* Add canAddXEditCollaborators to determine if owner can add more editors
* Update setCollaboratorInfo to check if editor slots are available
GitOrigin-RevId: a88707f102dfbde39322f5a7bbc79d47b6e810d5
* Add some JSDoc types to `@overleaf/logger`
* Update `logger.error` calls
* Fixup `logger.err` JSDoc
* Update `logger.err` calls
* Fix `args` type
* Remove "Error message" description
* Replace `arguments` by actual arguments of the method
* Fix: "ESLint: Unnecessary '.apply()'.(no-useless-call)"
* Add JSDoc params to `debug` `info` `warn`
* Remove extra `args` param in JSDoc so developers aren't invited to use it
Not sure if this is the best thing to do because it creates a warning in the IDE: "Parameter args is not described in JSDoc"
* Add comment about serialization of `err` `req` `res`
* Allow strings as first param in `debug` `info` `warn`
* Fix syntax for optional parameters in JSDoc
* Add 2 signatures, to avoid "string, string" params
* Fix `@signature` names copy-pastes
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
* Revert the double `@param attributes`. It doesn't work
---------
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 086dee8bbf30d577c5e1f844a9df5e518c46aca7
* Add helpers for checking and removing user readwrite token membership
* Add sharing-updates page and handlers
* Redirect read write token members to sharing-updates on project load
GitOrigin-RevId: d552a2cd74a9843c6103923b03f137131a48877a
* Only show the AI error assistant to users with write permission on the project
* Fix line number in searchDocLines
* Abort the request after 60 seconds
* Move comment
* Jump to file + line when suggestion line number is clicked
* Set tool_choice: 'required'
* Fix handling of suggestLineChange
* Tidy up getDocLines
* Avoid showing Suggest Fix button in gutter marker for typesetting warnings
* Log request errors
* Fix prefixed function name
* Update tool description
* Tweak the prompt in an attempt to improve the line number
* Reject if the total message content is too large
* Change the structure of the suggested change
* Reduce line highlight
* Fix change highlighting on deletion
GitOrigin-RevId: afde096e547050b8518195ef51b68983bc3b0be3
* Move unawaited promises out of `p-props`: `User.updateOne`
* Move unawaited promises out of `p-props`: `sessionMaintenance`
* Move unawaited promises out of `p-props`: `reactivateProjectIfRequired`
* Move unawaited promises out of `p-props`: `markAsOpened`
* Move unawaited promises out of `p-props`: `flushProjectToTpdsIfNeeded`
This was actually awaited, but is it necessary?
* Use `getUserValues`: `user`
* Use `getUserValues`: `learnedWords`
* Use `getUserValues`: `projectTags`
* Use `getUserValues`: `userHasInstitutionLicence`
* Use `getUserValues`: `subscription`
* Use `getUserValues`: `isTokenMember`
* Use `getUserValues`: `isInvitedMember`
* Update `splitTestAssignments` syntax
* Remove `mapValues` in `pProps`
* Await unused promises again: `flushProjectToTpdsIfNeeded` and `reactivateProjectIfRequired`
* Remove error page file committed by mistake 🤦
GitOrigin-RevId: 6529445c364a6af660bc8ab6dfc836a4ddf7a040
* Reapply "[web] Promisify MetricsEmailController and InstitutionHubsController …"
This reverts commit ea14df1395f1dc2fa7d41fc7837849f9686425b5.
* Fix changes to node-fetch: `statusCode` -> `status` (!!)
* Update test
* Handle no-content without throwing (!)
Avoid error `Unexpected end of JSON input` when doing `response.json()` on an empty response when status is 204
Related: https://github.com/node-fetch/node-fetch/issues/165
* Also return `204` when no data in departments_data and roles_data
* Revert "Handle no-content without throwing (!)", and return null instead
This reverts commits 3baa779f7a9e64804e54a276faf865ab9252f336 and 51507a3d763d7006c8b01414a7c79bd3f3b6948b.
* Update tests: `assert_nil`
* Fixup: Update tests: assert null
* Use `fetchJSON` in Institution.fetchV1Data
* Proxy errors from server without throwing 500
GitOrigin-RevId: 9c13e293f3fed3abd2accddd1a9060ed02b96ba2