Commit Graph

166 Commits

Author SHA1 Message Date
Samuel Paccoud - DINUM
515b686795 (models/api) allow inviting external users to a document by their email
We want to be able to share a document with a person even if this person
does not have an account in impress yet.

This code is ported from https://github.com/numerique-gouv/people.
2024-05-24 08:20:28 +02:00
Samuel Paccoud - DINUM
125284456f 🐛(docker-compose) run node container as logged-in user
Running the container as root will install npm modules with root
access rights and generate issues when running the application with
the logged in user as we do it with Docker Compose.
2024-05-24 08:20:28 +02:00
Anthony LC
b7b3c6c058 🧑‍💻(backend) add document in django admin
Add document in django admin to be able
to manage the document in the admin panel.
2024-05-23 10:44:52 +02:00
Anthony LC
644920e732 (frontend) coming soon
Add a coming soon page bind to the
docs.numerique.gouv.fr domain.
2024-05-23 10:44:52 +02:00
Anthony LC
dc319578b6 👷(helm) production configuration
This PR adds the production configuration
for the helm chart.
2024-05-23 10:44:52 +02:00
Lebaud Antoine
abf08fe3b3 🔧(helm) setup logout flow from Agent Connect
Add the relevant environment configurations to make sure the backend
in dev and staging environments log out the user from Agent Connect.
2024-05-22 16:08:41 +02:00
Lebaud Antoine
76e50ac02f (backend) support Agent Connect Logout flow
The default Logout view provided by Mozilla Django OIDC is not suitable
for the Agent Connect Logout flow.

Previously, when a user was logging-out, only its Django session was ended.
However, its session in the OIDC provider was still active.

Agent Connect implements a 'session/end' endpoint, that allows services to
end user session when they logout.

Agent Connect logout triggers cannot work with the default views implemented
by the dependency Mozilla Django OIDC. In their implementation, they decided
to end Django Session before redirecting to the OIDC provider.

The Django session needs to be retained during the logout process.

An OIDC state is saved to the request session, pass to Agent Connect Logout
endpoint, and verified when the backend receives the Logout callback from Agent
Connect. It seems to follow OIDC specifications.

If for any reason, the Logout flow cannot be initiated with Agent Connect,
(missing ID token in cache, unauthenticated user, etc), the user is redirected
to the final URL, without interacting with Agent Connect.
2024-05-22 16:08:41 +02:00
Lebaud Antoine
5f7e3e620a 🚚(backend) create a dedicated authentication package
Prepare adding advanced authentication features. Create a dedicated
authentication Python package within the core app.

This code organization will be more extensible.
2024-05-22 16:08:41 +02:00
Anthony LC
004a4edfe7 (frontend) add logout button
Rework the header based on latest Johann's design, which introduced a
dropdown menu to manage user account.

In this menu, you can find a logout button, which ends up the backend
session by calling the logout endpoint. Please that automatic redirection
when receiving the backend response were disabled. We handle it in our
custom hook, which reload the page.

Has the session cookie have been cleared, on reloading the page, a new
loggin flow is initiated, and the user is redirected to the OIDC provider.
2024-05-22 16:08:41 +02:00
Anthony LC
d221ebe4f9 💚(CI) increase timeout e2e job
It can happen that the e2e job takes longer
than 10 minutes to finish, we increase the
timeout to 15 minutes to avoid the job to fail.
2024-05-14 16:30:49 +02:00
Anthony LC
9903b43b72 ♻️(app-desk) change header html structure
Change the html structure of the header
component to be more aligned.
Remove dummy profil picture.
2024-05-14 16:12:36 +02:00
Anthony LC
d23426679a 🐛(app-desk) fix fetchPriority warning
The upgrade to react@18.3.1 has a compatibility
issue with next@14.2.3. It creates a error warning
about the fetchPriority prop. This commit fixes the
issue by downgrading react to 18.2.0 as it was
before the last upgrade.
2024-05-14 16:12:36 +02:00
Anthony LC
e2e34a011d (app-impress) add La Gaufre
Add La Gaufre.
It is a button to access easily to the
La Suite products.
2024-05-14 16:12:36 +02:00
Anthony LC
c1dd34512b 🚸(app-impress) footer legales pages
- Add legales pages.
- Add links to the footer for the new pages.

Legales pages are based from
https://lasuite.numerique.gouv.fr/
2024-05-14 11:57:19 +02:00
Anthony LC
88d6d8977c (app-impress) add footer
Add footer to the impress app.
2024-05-14 11:57:19 +02:00
Anthony LC
4ffcf164d8 💄(app-impress) lighter border pad editor
Make border pad editor a bit lighter.
2024-05-14 11:04:45 +02:00
Anthony LC
c25814b060 ♻️(app-impress) add transition props Box component
Add transition props to Box component.
2024-05-14 11:04:45 +02:00
Anthony LC
f88d625622 💄(app-impress) move title document to the top
Move teh title document to the top of the pad editor.
We let the white card only for the pad content.
2024-05-14 11:04:45 +02:00
Anthony LC
a26ee3b868 💬(app-impress) replace recent with documents
Replace Recent literal by Documents.
2024-05-14 11:04:45 +02:00
Anthony LC
c0d919ae52 💄(app-impress) re-design icon close panel
We deleted the menu, so we have to retouch
a bit the icon close panel to fit the new design.
We change the icon to have something more
intuitive by using material icons.
2024-05-14 11:04:45 +02:00
Anthony LC
944385c83f 🔥(app-impress) remove menu
For the moment we only have 1 menu item,
so we can remove the menu.
2024-05-14 11:04:45 +02:00
Anthony LC
ccb6d4cb91 (app-impress) add @blocknote/mantine
The new version of blocknote dissociates
the ux from the @blocknote/react package.
It is now in a separate package @blocknote/mantine.
We add this package to the impress app.
We adapt the toolbar to fit the new package.
2024-05-13 17:21:58 +02:00
renovate[bot]
5853adb8eb ⬆️(dependencies) update js dependencies 2024-05-13 17:21:58 +02:00
Anthony LC
70994de914 💚(ci) improve secrets for createsuperuser
Avoid secrets to be visible from running deployments.
2024-05-13 12:12:52 +02:00
Anthony LC
df0ff61faf 👷(CI) configure Minio with the CI
Add the minio container to the CI on the
job test-back. Adapt the conf to have
Minio working with the backend.
2024-05-13 12:12:52 +02:00
Anthony LC
b94f08d275 🧑‍💻(helm) add minio in staging environment
Add minio in staging environment.
Set the env var for the backend.
2024-05-13 12:12:52 +02:00
Anthony LC
a764e5989c 🧑‍💻(helm) add minio in dev environment
Add minio in dev environment.
Set the env var for the backend.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
130e7a8c99 (documents) allow retrieving versions (list and detail)
Versions are retrieved directly from object storage and served on API
endpoints. We make sure a user who is given access to a document will
only see versions that were created after s.he gained access.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
8e262da8f5 (documents) add content field as an S3 object
The content field is a writable property on the model which is persisted
in object storage. We take advantage of the versioning, robustness and
scalability of S3.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
4956beb040 (docker-compose) add minio for object storage
We will need object storage to store our document content which comes
as a big json object. Storing it in object storage will offer us
versioning, robustness and scalability.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
397b9efbce (models/api) add document model and API
We do this by making copies of existing Template and TemplateAccess
models and API. A little refactoring is done to try to limit duplicate
code.
2024-05-13 12:12:52 +02:00
Jacques ROUSSEL
7c6e48975d 💚(ci) improve local deployment with tilt
Change the way we start django app in order to be abble to use django
admin on local deployment
2024-05-13 11:15:43 +02:00
Anthony LC
f0a4de361e 👷(helm) command createsuperuser
We sometimes need a superuser in the Django
application, to fix eventual db issues.
This commit adds a superuser on the pods.
2024-05-13 11:15:43 +02:00
Anthony LC
f0b3090a73 ♻️(frontend) frontend environment free
Until now, the front had to know at build time
the url of the backend and the webrtc server
to be able to communicate with them.
It is not optimal because it means that we need
multiple docker image (1 per environment) to have
the app working, it is not very flexible.

This commit will make the frontend "environment free"
by determining these urls at runtime.
2024-05-13 11:04:06 +02:00
Anthony LC
88109623ba ♻️(app-desk) replace classname spacings
Replace the classname spacings with the new
spacing system based on props.
2024-05-03 15:47:36 +02:00
Anthony LC
d8e7f29072 🎨(app-desk) add margin and padding to Box
Add margin and padding system to Box component.
It proposes the autocompletion.
It is bind with the Cunninghams spacing system.
2024-05-03 15:47:36 +02:00
Jacques ROUSSEL
0c2d097d8d 💚(ci) improve secrets for k8s deployment
Avoid secrets to be visible from running deployments
2024-05-02 16:06:58 +02:00
Anthony LC
5fbb5106a9 🔥(backend) remove code_editor field
code_editor field was removed from the backend.
This filed was used to store the code editor to
generate templates.
2024-05-02 15:24:51 +02:00
Anthony LC
c7a5b5f3fb 🤡(backend-demo) remove code_editor from demo
We removed the template code_editor from app, so
we redapt the demo to fit the old template.
The field code_editor is not needed anymore.
2024-05-02 15:24:51 +02:00
Anthony LC
d967896874 🔥(app-impress) remove templates
We will generate the templates internally.
We remove the template editor.
2024-05-02 15:24:51 +02:00
Anthony LC
b98cc01592 🚚(app-impress) move templates api to pad-tools
Before removing the templates feature, we move the
necessary api to the pad feature.
2024-05-02 15:24:51 +02:00
Anthony LC
d9fa75b764 ⬇️(frontend) react 18.3.1 -> 18.2.0
Downgrade react to 18.2.0.
It seems to have a compatibility issue
with @openfun/cunningham-react.
2024-04-29 15:21:25 +02:00
Anthony LC
33b39ce315 ⬇️(eslint-config-people) eslint 9.0.0 -> 8.57.0
Downgrade eslint to 8.57.0.
9.0.0 has breaking changes, the adoption
is still very low, better to wait.
Add it in the renovate.json file.
2024-04-29 15:21:25 +02:00
renovate[bot]
f5ddce6b47 ⬆️(dependencies) update js dependencies 2024-04-29 15:21:25 +02:00
renovate[bot]
8d48ded46b ⬆️(dependencies) update gunicorn to v22 [SECURITY] 2024-04-29 10:53:14 +02:00
Jacques ROUSSEL
f9bec19c7d 🐛(ci) improve docker-hub
Avoid to notify argocd for nothing
2024-04-29 10:29:56 +02:00
Anthony LC
89aa048fc1 🐛(app-desk) force redirect on resources/[id]
When we use the static mode, Next.js want that we
build our resource pages at build time. But we can't
do that because users can create a resource at runtime.

So we redirect thanks to ngnix when we see that
a resource page is not found.
2024-04-19 13:38:28 +02:00
Anthony LC
b2cc789665 ️(docker) separate deps y-webrtc-signaling
We separate the install part of the signaling server
from the frontend-dep stage. It will improve
the build time of both of them.
2024-04-19 13:38:28 +02:00
Anthony LC
9489264555 🔥(eslint) remove uneeded yarn.lock file
The yarn.lock doesn't seem necessary for this
package, so we're removing it.
Update the frontend yarn.lock
2024-04-19 13:38:28 +02:00
Anthony LC
e1b94e3443 🌐(app-impress) translate impress in french
Add french translation to impress.
2024-04-19 13:38:28 +02:00