Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨(models/api) allow inviting external users to a document by their email #56

Merged
merged 2 commits into from
May 24, 2024

Conversation

sampaccoud
Copy link
Member

Purpose

We want to be able to share a document with a person even if this person does not have an account in impress yet.

Proposal

This code is ported from https://github.com/numerique-gouv/people and adapted to the differences in Impress:

  • accesses work for users as well as for teams
  • no Identity object, the identity is carried by the User

Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see the tests failed probably because mail/html/invitation.html is not generated.

I have a question about that, why the mail templates are not git versioned ? If we versioned our templates, we will not have to build them constantly in the CI or in the make bootstrap.


Otherwise they can be generated like that in the CI:
See: suitenumerique/people@f6d5f73

@AntoLC AntoLC self-requested a review May 14, 2024 14:43
src/mail/mjml/invitation.mjml Show resolved Hide resolved
src/mail/mjml/invitation.mjml Outdated Show resolved Hide resolved
@sampaccoud
Copy link
Member Author

@AntoLC I think email templates should not be persisted for reason of "unicity of information". As long as we are able to generate the content, it is technically not part of our source code in my opinion.

@sampaccoud sampaccoud requested a review from AntoLC May 20, 2024 21:05
@sampaccoud
Copy link
Member Author

@AntoLC I pushed a fixup. The PR is ready for further review!

Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

src/mail/mjml/invitation.mjml Show resolved Hide resolved
@sampaccoud sampaccoud force-pushed the add-user-invitations branch from cb9cc2d to 65671ed Compare May 21, 2024 21:25
@sampaccoud sampaccoud enabled auto-merge (rebase) May 21, 2024 21:25
@sampaccoud sampaccoud disabled auto-merge May 21, 2024 21:28
@sampaccoud sampaccoud force-pushed the add-user-invitations branch from 65671ed to d89f146 Compare May 21, 2024 21:29
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.
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.
@sampaccoud sampaccoud force-pushed the add-user-invitations branch from d89f146 to f246d11 Compare May 24, 2024 06:10
@sampaccoud sampaccoud enabled auto-merge (rebase) May 24, 2024 06:14
@sampaccoud sampaccoud disabled auto-merge May 24, 2024 06:14
@sampaccoud sampaccoud enabled auto-merge (rebase) May 24, 2024 06:16
@sampaccoud sampaccoud merged commit 515b686 into main May 24, 2024
16 of 17 checks passed
@sampaccoud sampaccoud deleted the add-user-invitations branch May 24, 2024 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants