- Mar 29, 2025
-
-
Manuel Raynaud authored
We recently extract images url in the content. For this, we assume that the document content is always in base64. We enforce this assumption by checking if it's a valide base64 in the serializer.
-
- Mar 28, 2025
-
-
Berry den Hartog authored
Signed-off-by: Berry den Hartog <38954346+berrydenhartog@users.noreply.github.com>
-
Bastien Guerry authored
We need to double-check our legal constraints regarding the use of XL packages within Docs. In the meantime, sends a message to potential reusers.
-
Jacques ROUSSEL authored
In order to refactor this notification between alls projetcs, we choose to use a custom github action
-
Anthony LC authored
Added: -
📄 (legal) Require contributors to sign a DCO Changed: -♻️ (frontend) Integrate UI kit -🏗️ (y-provider) manage auth in y-provider app Fixed: -🐛 (backend) compute ancestor_links in get_abilities if needed - 🔒️(back) restrict access to document accesses -
Anthony LC authored
When multiple tabs are open, the new service worker can stay in the "waiting" state and not be activated until the other tabs with the old service worker are closed. We fix this by forcing the other tabs to reload the page when a new service worker is detected. All tabs will then be reloaded and the new service worker will be activated.
-
Anthony LC authored
The way that collaboration server authentifies the user has changed. We adapt the configuration to the new way of doing it, by removing the nginx auth url, and by adding COLLABORATION_BACKEND_BASE_URL setting.
-
Anthony LC authored
- fix width select export
-
- Mar 27, 2025
-
-
Manuel Raynaud authored
We only use uuid v4 as hocuspocus dicument name. To be sure nothing else is used we check that the documentName is a valid uuid version 4.
-
Manuel Raynaud authored
We don't need anymore the collaboration-auth endpoint. Every code related to it is removed.
-
Manuel Raynaud authored
The way to connect to the hocuspocus server needs to be proxified in nginx to query a dedicated route in the django application and then follow the request to the express server with the additionnal headers. The auth can be done in the express server by querying the backend on the document retrieve endpoint. If the response status code is 200, the user has access to the document, otherwise it is not the case. Then we can check the abilities to determine what the user can do or not.
-
Manuel Raynaud authored
Ypy is deprecated and unmaintained. We have problem with parsing existing documents. We replace it by pycrdt, library actively maintained and without the issues we have with Ypy.
-
Manuel Raynaud authored
Level filtering was used on the logging console handler. We remove as it is not necessary to have it.
-
Manuel Raynaud authored
The argocd webhook call needs now to use sha256 digest now to sign
-
- Mar 26, 2025
-
-
Manuel Raynaud authored
Every user having an access to a document, no matter its role have access to the entire accesses list with all the user details. Only owner or admin should be able to have the entire list, for the other roles, they have access to the list containing only owner and administrator with less information on the username. The email and its id is removed
-
- Mar 24, 2025
-
-
Quentin BEY authored
During a code review, I saw we are overriding the MP_NodeManager and redefine the queryset filters: - The MP_NodeManager sorts the queryset by `path` by default and it's not done on our side, is it on purpose? - The fact we need to redefine `readable_per_se` as a boilerplate is surprising. I suggest we use the Django mechanism to generate the manager from the queryset.
-
Manuel Raynaud authored
The refactor made in the tree view caching the ancestors_links to not compute them again in the document.get_abilities method lead to a bug. If the get_abilities method is called without ancestors_links, then they are computed on all the ancestors but not from the highest readable ancestor for the current user. We have to compute them with this constraint.
-
Samuel Paccoud - DINUM authored
The idea behind wrapping choices in `lazy` function was to allow overriding the list of languages in tests with `override_settings`. This was causin makemigrations to keep on including the field in migrations when it is not needed. Since we finally don't override the LANGUAGES setting in tests, we can remove it to fix the problem.
-
Samuel Paccoud - DINUM authored
We can't prevent document editors from copy/pasting content to from one document to another. The problem is that copying content, will copy the urls pointing to attachments but if we don't do anything, the reader of the document to which the content is being pasted, may not be allowed to access the attachment files from the original document. Using the work from the previous commit, we can grant access to the readers of the target document by extracting the attachment keys from the content and adding themto the target document's "attachments" field. Before doing this, we check that the current user can indeed access the attachment files extracted from the content and that they are allowed to edit the current document.
-
Samuel Paccoud - DINUM authored
We took this opportunity to refactor the way access is controlled on media attachments. We now add the media key to a list on the document instance each time a media is uploaded to a document. This list is passed along when a document is duplicated, allowing us to grant access to readers on the new document, even if they don't have or lost access to the original document. We also propose an option to reproduce the same access rights on the duplicate document as what was in place on the original document. This can be requested by passing the "with_accesses=true" option in the query string. The tricky point is that we need to extract attachment keys from the existing documents and set them on the new "attachments" field that is now used to track access rights on media files.
-
Samuel Paccoud - DINUM authored
Migration tests should not import and use factories or models directly from the code because they would not be in sync with the database in the state that each state needs to test it. Instead the migrator object passed as argument allows us to retrieve a minimal version of the models in sync with the state of the database that we are testing. What we get is a minimal model and we need to simulate all the methods that we could have on the real model and that are needed for testing.
-
Samuel Paccoud - DINUM authored
These methods were involved in a bug that was fixed without first evidencing the error in a test: https://github.com/suitenumerique/docs/pull/556 Fixes https://github.com/suitenumerique/docs/issues/567
-
Samuel Paccoud - DINUM authored
Tests were forgotten. While writing the tests, I fixed a few edge cases like the possibility to connect to the collaboration server for an anonymous user.
-
Samuel Paccoud - DINUM authored
These 2 actions had factorized code but a few iterations lead to spaghetti code where factorized code includes "if" clauses. Refactor abstractions so that code factorization really works.
-
Samuel Paccoud - DINUM authored
Documents content is stored in the Ydoc format. We need a util to extract it as xml/text.
-
Jacques ROUSSEL authored
The Tilt stack was not starting properly due to dependency issues. We need to wait for PostgreSQL to be running before starting the migration.
-
renovate[bot] authored
-
- Mar 23, 2025
-
-
Bastien Guerry authored
Contributors are required to sign off their commits: this confirms that they have read and accepted https://developercertificate.org.
-
- Mar 22, 2025
-
-
Sylvain Zimmer authored
Some providers with S3-compatible APIs have slightly different implementations. In this case, Scaleway didn't accept version_id="" and has a different version ID scheme. This was tested successfully and should remain compatible with any other provider.
-
Manuel Raynaud authored
New Ruff rule (C420) detects code that should be linted. We apply this new rule on our code.
-
renovate[bot] authored
-
- Mar 21, 2025
-
-
Anthony LC authored
Marianne font is now part of the UI kit. We can remove it from the project.
-
Nathan Panchout authored
The configuration file has been simplified by importing configurations from @gouvfr-lasuite/ui-kit . Colors and components have been updated to reflect the new values. Additionally, adjustments have been made to global styles, including the addition of styles for Material icons. Form components have also been modified to incorporate the new style properties.
-
Nathan Panchout authored
Added several new dependencies to the `package.json` file, including `@dnd-kit/core`, `@dnd-kit/modifiers`, `@fontsource/material-icons`, and `@gouvfr-lasuite/ui-kit`.
-
Anthony LC authored
Added: -
📝 (doc) add publiccode.yml Changed -🚸 (frontend) ctrl+k modal not when editor is focused Fixed: -🐛 (back) allow only images to be used with the cors-proxy -🐛 (backend) stop returning inactive users on the list endpoint - 🔒️(backend) require at least 5 characters to search for users - 🔒️(back) throttle user list endpoint - 🔒️(back) remove pagination and limit to 5 for user list endpoint -
Anthony LC authored
Multiple ctrl+k could open the search modal, we change the selector, now if the toolbar is displayed we don't open the search modal.
-
Anthony LC authored
We now only search for users when the query is at least 5 characters long.
-
Manuel Raynaud authored
The user list endpoint is throttle to avoid users discovery. The throttle is set to 500 requests per day. This can be changed using the settings API_USERS_LIST_THROTTLE_RATE.
-
Anthony LC authored
The response from the user request is now an array of users, we don't paginate anymore. We adapt the types to reflect this.
-
Manuel Raynaud authored
The user list endpoint does not use anymore a pagination, the results is directly return in a list and the max results returned is limited to 5. In order to modify this limit the settings API_USERS_LIST_LIMIT is used.
-