diff --git a/CHANGELOG.md b/CHANGELOG.md index 502313c9..e7b2898e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -557,7 +557,7 @@ and this project adheres to - ⚡️(e2e) unique login between tests (#80) - ⚡️(CI) improve e2e job (#86) - ♻️(frontend) improve the error and message info ui (#93) -- ✏️(frontend) change all occurences of pad to doc (#99) +- ✏️(frontend) change all occurrences of pad to doc (#99) ## Fixed diff --git a/SECURITY.md b/SECURITY.md index 8ae57564..0ba904a8 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ Security is very important to us. -If you have any issue regarding security, please disclose the information responsibly submiting [this form](https://vdp.numerique.gouv.fr/p/Send-a-report?lang=en) and not by creating an issue on the repository. You can also email us at docs@numerique.gouv.fr +If you have any issue regarding security, please disclose the information responsibly submitting [this form](https://vdp.numerique.gouv.fr/p/Send-a-report?lang=en) and not by creating an issue on the repository. You can also email us at docs@numerique.gouv.fr We appreciate your effort to make Docs more secure. diff --git a/docs/env.md b/docs/env.md index 2b66aa21..e29e99b8 100644 --- a/docs/env.md +++ b/docs/env.md @@ -39,7 +39,7 @@ These are the environmental variables you can set for the impress-backend contai | DJANGO_EMAIL_PORT | port used to connect to email host | | | DJANGO_EMAIL_USE_TLS | use tls for email host connection | false | | DJANGO_EMAIL_USE_SSL | use sstl for email host connection | false | -| DJANGO_EMAIL_FROM | email adress used as sender | from@example.com | +| DJANGO_EMAIL_FROM | email address used as sender | from@example.com | | DJANGO_CORS_ALLOW_ALL_ORIGINS | allow all CORS origins | true | | DJANGO_CORS_ALLOWED_ORIGINS | list of origins allowed for CORS | [] | | DJANGO_CORS_ALLOWED_ORIGIN_REGEXES | list of origins allowed for CORS using regulair expressions | [] | @@ -59,11 +59,11 @@ These are the environmental variables you can set for the impress-backend contai | OIDC_RP_CLIENT_ID | client id used for OIDC | impress | | OIDC_RP_CLIENT_SECRET | client secret used for OIDC | | | OIDC_OP_JWKS_ENDPOINT | JWKS endpoint for OIDC | | -| OIDC_OP_AUTHORIZATION_ENDPOINT | Autorization endpoint for OIDC | | +| OIDC_OP_AUTHORIZATION_ENDPOINT | Authorization endpoint for OIDC | | | OIDC_OP_TOKEN_ENDPOINT | Token endpoint for OIDC | | | OIDC_OP_USER_ENDPOINT | User endpoint for OIDC | | | OIDC_OP_LOGOUT_ENDPOINT | Logout endpoint for OIDC | | -| OIDC_AUTH_REQUEST_EXTRA_PARAMS | OIDC extra auth paramaters | {} | +| OIDC_AUTH_REQUEST_EXTRA_PARAMS | OIDC extra auth parameters | {} | | OIDC_RP_SCOPES | scopes requested for OIDC | openid email | | LOGIN_REDIRECT_URL | login redirect url | | | LOGIN_REDIRECT_URL_FAILURE | login redirect url on failure | | @@ -73,7 +73,7 @@ These are the environmental variables you can set for the impress-backend contai | OIDC_REDIRECT_ALLOWED_HOSTS | Allowed hosts for OIDC redirect url | [] | | OIDC_STORE_ID_TOKEN | Store OIDC token | true | | OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION | faillback to email for identification | true | -| OIDC_ALLOW_DUPLICATE_EMAILS | Allow dupplicate emails | false | +| OIDC_ALLOW_DUPLICATE_EMAILS | Allow duplicate emails | false | | USER_OIDC_ESSENTIAL_CLAIMS | essential claims in OIDC token | [] | | OIDC_USERINFO_FULLNAME_FIELDS | OIDC token claims to create full name | ["first_name", "last_name"] | | OIDC_USERINFO_SHORTNAME_FIELD | OIDC token claims to create shortname | first_name | diff --git a/docs/examples/impress.values.yaml b/docs/examples/impress.values.yaml index 26659512..ce28e4c4 100644 --- a/docs/examples/impress.values.yaml +++ b/docs/examples/impress.values.yaml @@ -82,13 +82,13 @@ backend: python manage.py createsuperuser --email admin@example.com --password admin restartPolicy: Never - # Exra volume to manage our local custom CA and avoid to set ssl_verify: false + # Extra volume to manage our local custom CA and avoid to set ssl_verify: false extraVolumeMounts: - name: certs mountPath: /usr/local/lib/python3.12/site-packages/certifi/cacert.pem subPath: cacert.pem - # Exra volume to manage our local custom CA and avoid to set ssl_verify: false + # Extra volume to manage our local custom CA and avoid to set ssl_verify: false extraVolumes: - name: certs configMap: diff --git a/docs/installation.md b/docs/installation.md index 6a979fea..65e7c8da 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -133,7 +133,7 @@ OIDC_RP_SCOPES: "openid email" You can find these values in **examples/keycloak.values.yaml** -### Find redis server connexion values +### Find redis server connection values Docs needs a redis so we start by deploying one: @@ -146,7 +146,7 @@ keycloak-postgresql-0 1/1 Running 0 26m redis-master-0 1/1 Running 0 35s ``` -### Find postgresql connexion values +### Find postgresql connection values Docs uses a postgresql database as backend, so if you have a provider, obtain the necessary information to use it. If you don't, you can install a postgresql testing environment as follow: @@ -173,7 +173,7 @@ POSTGRES_USER: dinum POSTGRES_PASSWORD: pass ``` -### Find s3 bucket connexion values +### Find s3 bucket connection values Docs uses an s3 bucket to store documents, so if you have a provider obtain the necessary information to use it. If you don't, you can install a local minio testing environment as follow: @@ -191,7 +191,7 @@ redis-master-0 1/1 Running 0 10m ## Deployment -Now you are ready to deploy Docs without AI. AI requires more dependencies (OpenAI API). To deploy Docs you need to provide all previous informations to the helm chart. +Now you are ready to deploy Docs without AI. AI requires more dependencies (OpenAI API). To deploy Docs you need to provide all previous information to the helm chart. ``` $ helm repo add impress https://suitenumerique.github.io/docs/ diff --git a/src/backend/core/api/viewsets.py b/src/backend/core/api/viewsets.py index 45bc9bc8..578c49d6 100644 --- a/src/backend/core/api/viewsets.py +++ b/src/backend/core/api/viewsets.py @@ -576,7 +576,7 @@ class DocumentViewSet( queryset, filter_data["is_favorite"] ) - # Apply ordering only now that everyting is filtered and annotated + # Apply ordering only now that everything is filtered and annotated queryset = filters.OrderingFilter().filter_queryset( self.request, queryset, self ) @@ -889,7 +889,7 @@ class DocumentViewSet( ) # Compute cache for ancestors links to avoid many queries while computing - # abilties for his documents in the tree! + # abilities for his documents in the tree! ancestors_links.append( {"link_reach": ancestor.link_reach, "link_role": ancestor.link_role} ) diff --git a/src/backend/core/services/ai_services.py b/src/backend/core/services/ai_services.py index c1410551..97ad583d 100644 --- a/src/backend/core/services/ai_services.py +++ b/src/backend/core/services/ai_services.py @@ -44,7 +44,7 @@ AI_ACTIONS = { } AI_TRANSLATE = ( - "Keep the same html stucture and formatting. " + "Keep the same html structure and formatting. " "Translate the content in the html to the specified language {language:s}. " "Check the translation for accuracy and make any necessary corrections. " "Do not provide any other information." diff --git a/src/backend/core/services/collaboration_services.py b/src/backend/core/services/collaboration_services.py index 283a8742..dac16fa6 100644 --- a/src/backend/core/services/collaboration_services.py +++ b/src/backend/core/services/collaboration_services.py @@ -17,7 +17,7 @@ class CollaborationService: def reset_connections(self, room, user_id=None): """ Reset connections of a room in the collaboration server. - Reseting a connection means that the user will be disconnected and will + Resetting a connection means that the user will be disconnected and will have to reconnect to the collaboration server, with updated rights. """ endpoint = "reset-connections" diff --git a/src/backend/core/tests/documents/test_api_document_invitations.py b/src/backend/core/tests/documents/test_api_document_invitations.py index 9efd2190..16090b7d 100644 --- a/src/backend/core/tests/documents/test_api_document_invitations.py +++ b/src/backend/core/tests/documents/test_api_document_invitations.py @@ -575,7 +575,7 @@ def test_api_document_invitations_create_cannot_invite_existing_users(): document = factories.DocumentFactory(users=[(user, "owner")]) existing_user = factories.UserFactory() - # Build an invitation to the email of an exising identity in the db + # Build an invitation to the email of an existing identity in the db invitation_values = { "email": existing_user.email, "role": random.choice(models.RoleChoices.values), diff --git a/src/backend/core/tests/documents/test_api_documents_ai_transform.py b/src/backend/core/tests/documents/test_api_documents_ai_transform.py index 41e216ec..81b69174 100644 --- a/src/backend/core/tests/documents/test_api_documents_ai_transform.py +++ b/src/backend/core/tests/documents/test_api_documents_ai_transform.py @@ -150,7 +150,7 @@ def test_api_documents_ai_transform_authenticated_forbidden(reach, role): @patch("openai.resources.chat.completions.Completions.create") def test_api_documents_ai_transform_authenticated_success(mock_create, reach, role): """ - Autenticated who are not related to a document should be able to request AI transform + Authenticated who are not related to a document should be able to request AI transform if the link reach and role permit it. """ user = factories.UserFactory() diff --git a/src/backend/core/tests/documents/test_api_documents_ai_translate.py b/src/backend/core/tests/documents/test_api_documents_ai_translate.py index a04a427d..f0d7978c 100644 --- a/src/backend/core/tests/documents/test_api_documents_ai_translate.py +++ b/src/backend/core/tests/documents/test_api_documents_ai_translate.py @@ -99,7 +99,7 @@ def test_api_documents_ai_translate_anonymous_success(mock_create): { "role": "system", "content": ( - "Keep the same html stucture and formatting. " + "Keep the same html structure and formatting. " "Translate the content in the html to the specified language Spanish. " "Check the translation for accuracy and make any necessary corrections. " "Do not provide any other information." @@ -172,7 +172,7 @@ def test_api_documents_ai_translate_authenticated_forbidden(reach, role): @patch("openai.resources.chat.completions.Completions.create") def test_api_documents_ai_translate_authenticated_success(mock_create, reach, role): """ - Autenticated who are not related to a document should be able to request AI translate + Authenticated who are not related to a document should be able to request AI translate if the link reach and role permit it. """ user = factories.UserFactory() @@ -197,7 +197,7 @@ def test_api_documents_ai_translate_authenticated_success(mock_create, reach, ro { "role": "system", "content": ( - "Keep the same html stucture and formatting. " + "Keep the same html structure and formatting. " "Translate the content in the html to the " "specified language Colombian Spanish. " "Check the translation for accuracy and make any necessary corrections. " @@ -274,7 +274,7 @@ def test_api_documents_ai_translate_success(mock_create, via, role, mock_user_te { "role": "system", "content": ( - "Keep the same html stucture and formatting. " + "Keep the same html structure and formatting. " "Translate the content in the html to the " "specified language Colombian Spanish. " "Check the translation for accuracy and make any necessary corrections. " diff --git a/src/backend/core/tests/documents/test_api_documents_attachment_upload.py b/src/backend/core/tests/documents/test_api_documents_attachment_upload.py index 40f96bcb..214a1a2b 100644 --- a/src/backend/core/tests/documents/test_api_documents_attachment_upload.py +++ b/src/backend/core/tests/documents/test_api_documents_attachment_upload.py @@ -131,7 +131,7 @@ def test_api_documents_attachment_upload_authenticated_forbidden(reach, role): ) def test_api_documents_attachment_upload_authenticated_success(reach, role): """ - Autenticated users who are not related to a document should be able to upload + Authenticated users who are not related to a document should be able to upload a file when the link reach and role permit it. """ user = factories.UserFactory() @@ -266,7 +266,7 @@ def test_api_documents_attachment_upload_invalid(client): def test_api_documents_attachment_upload_size_limit_exceeded(settings): - """The uploaded file should not exceeed the maximum size in settings.""" + """The uploaded file should not exceed the maximum size in settings.""" settings.DOCUMENT_IMAGE_MAX_SIZE = 1048576 # 1 MB for test user = factories.UserFactory() diff --git a/src/backend/core/tests/documents/test_api_documents_create_for_owner.py b/src/backend/core/tests/documents/test_api_documents_create_for_owner.py index c2e878d1..b2a76e55 100644 --- a/src/backend/core/tests/documents/test_api_documents_create_for_owner.py +++ b/src/backend/core/tests/documents/test_api_documents_create_for_owner.py @@ -279,7 +279,7 @@ def test_api_documents_create_for_owner_existing_user_email_no_sub_with_fallback """ It should be possible to create a document on behalf of a pre-existing user for who the sub was not found if the settings allow it. This edge case should not - happen in a healthy OIDC federation but can be usefull if an OIDC provider modifies + happen in a healthy OIDC federation but can be useful if an OIDC provider modifies users sub on each login for example... """ user = factories.UserFactory(language="en-us") diff --git a/src/backend/core/tests/documents/test_api_documents_move.py b/src/backend/core/tests/documents/test_api_documents_move.py index d093e491..a0dd8350 100644 --- a/src/backend/core/tests/documents/test_api_documents_move.py +++ b/src/backend/core/tests/documents/test_api_documents_move.py @@ -310,7 +310,7 @@ def test_api_documents_move_authenticated_deleted_target_as_child(position): def test_api_documents_move_authenticated_deleted_target_as_sibling(position): """ It should not be possible to move a document as a sibling of a deleted target document - if the user has no rigths on its parent. + if the user has no rights on its parent. """ user = factories.UserFactory() client = APIClient() diff --git a/src/backend/core/tests/documents/test_api_documents_update_extract_attachments.py b/src/backend/core/tests/documents/test_api_documents_update_extract_attachments.py index b52f83e3..10c798f8 100644 --- a/src/backend/core/tests/documents/test_api_documents_update_extract_attachments.py +++ b/src/backend/core/tests/documents/test_api_documents_update_extract_attachments.py @@ -31,7 +31,7 @@ def get_ydoc_with_mages(image_keys): def test_api_documents_update_new_attachment_keys_anonymous(django_assert_num_queries): """ When an anonymous user updates a document, the attachment keys extracted from the - updated content should be added to the list of "attachments" ot the document if these + updated content should be added to the list of "attachments" to the document if these attachments are already readable by anonymous users. """ image_keys = [f"{uuid4()!s}/attachments/{uuid4()!s}.png" for _ in range(4)] @@ -78,7 +78,7 @@ def test_api_documents_update_new_attachment_keys_authenticated( ): """ When an authenticated user updates a document, the attachment keys extracted from the - updated content should be added to the list of "attachments" ot the document if these + updated content should be added to the list of "attachments" to the document if these attachments are already readable by the editing user. """ user = factories.UserFactory() diff --git a/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts b/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts index 08bb6a10..b41ecc33 100644 --- a/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts +++ b/src/frontend/apps/e2e/__tests__/app-impress/doc-export.spec.ts @@ -141,7 +141,7 @@ test.describe('Doc Export', () => { /** * This test tell us that the export to pdf is working with images - * but it does not tell us if the images are beeing displayed correctly + * but it does not tell us if the images are being displayed correctly * in the pdf. * * TODO: Check if the images are displayed correctly in the pdf diff --git a/src/frontend/apps/impress/src/components/Text.tsx b/src/frontend/apps/impress/src/components/Text.tsx index 486daf29..83bf0b32 100644 --- a/src/frontend/apps/impress/src/components/Text.tsx +++ b/src/frontend/apps/impress/src/components/Text.tsx @@ -10,7 +10,7 @@ type TextSizes = keyof typeof sizes; export interface TextProps extends BoxProps { as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; - $elipsis?: boolean; + $ellipsis?: boolean; $weight?: CSSProperties['fontWeight']; $textAlign?: CSSProperties['textAlign']; $size?: TextSizes | (string & {}); @@ -50,8 +50,8 @@ export const TextStyled = styled(Box)` ${({ $theme, $variation }) => `color: var(--c--theme--colors--${$theme}-${$variation});`} ${({ $color }) => $color && `color: ${$color};`} - ${({ $elipsis }) => - $elipsis && + ${({ $ellipsis }) => + $ellipsis && `white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`} `; diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx index 910b7444..274adcff 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/hook/useSaveDoc.tsx @@ -61,7 +61,7 @@ const useSaveDoc = (docId: string, yDoc: Y.Doc, canSave: boolean) => { const isSaving = saveDoc(); /** - * Firefox does not trigger the request everytime the user leaves the page. + * Firefox does not trigger the request every time the user leaves the page. * Plus the request is not intercepted by the service worker. * So we prevent the default behavior to have the popup asking the user * if he wants to leave the page, by adding the popup, we let the time to the diff --git a/src/frontend/apps/impress/src/features/docs/doc-export/blocks-mapping/tablePDF.tsx b/src/frontend/apps/impress/src/features/docs/doc-export/blocks-mapping/tablePDF.tsx index f8a2b1dc..878c88ea 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-export/blocks-mapping/tablePDF.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-export/blocks-mapping/tablePDF.tsx @@ -4,7 +4,7 @@ * See: * https://github.com/TypeCellOS/BlockNote/blob/004c0bf720fe1415c497ad56449015c5f4dd7ba0/packages/xl-pdf-exporter/src/pdf/util/table/Table.tsx * - * We succeded to manage the colspan, but rowspan is not supported yet. + * We succeeded to manage the colspan, but rowspan is not supported yet. */ import { TD, TR, Table } from '@ag-media/react-pdf-table'; diff --git a/src/frontend/apps/impress/src/features/service-worker/service-worker.ts b/src/frontend/apps/impress/src/features/service-worker/service-worker.ts index 5618eebe..aa8f2861 100644 --- a/src/frontend/apps/impress/src/features/service-worker/service-worker.ts +++ b/src/frontend/apps/impress/src/features/service-worker/service-worker.ts @@ -185,7 +185,7 @@ registerRoute( ); /** - * Cache stategy static files images (images / svg) + * Cache strategy static files images (images / svg) */ registerRoute( ({ request }) => request.destination === 'image', @@ -201,7 +201,7 @@ registerRoute( ); /** - * Cache stategy static files fonts + * Cache strategy static files fonts */ googleFontsCache(); registerRoute( @@ -218,7 +218,7 @@ registerRoute( ); /** - * Cache stategy static files (css, js, workers) + * Cache strategy static files (css, js, workers) */ registerRoute( ({ request }) => diff --git a/src/helm/env.d/dev/values.impress.yaml.gotmpl b/src/helm/env.d/dev/values.impress.yaml.gotmpl index c0a3c539..c34da6cb 100644 --- a/src/helm/env.d/dev/values.impress.yaml.gotmpl +++ b/src/helm/env.d/dev/values.impress.yaml.gotmpl @@ -99,7 +99,7 @@ backend: mountPath: /usr/local/lib/python3.12/site-packages/certifi/cacert.pem subPath: cacert.pem - # Exra volumes to manage our local custom CA and avoid to set ssl_verify: false + # Extra volumes to manage our local custom CA and avoid to set ssl_verify: false extraVolumes: - name: certs configMap: diff --git a/src/helm/impress/templates/_helpers.tpl b/src/helm/impress/templates/_helpers.tpl index 921244ed..63a9f4b3 100644 --- a/src/helm/impress/templates/_helpers.tpl +++ b/src/helm/impress/templates/_helpers.tpl @@ -51,7 +51,7 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* -transform dictionnary of environment variables +transform dictionary of environment variables Usage : {{ include "impress.env.transformDict" .Values.envVars }} Example: