♻️(email) use full name instead of email
If the full name is available, we will use it to identify the user in the email instead of the email address.
This commit is contained in:
@@ -576,8 +576,12 @@ class DocumentAccessViewSet(
|
||||
"""Add a new access to the document and send an email to the new added user."""
|
||||
access = serializer.save()
|
||||
language = self.request.headers.get("Content-Language", "en-us")
|
||||
|
||||
access.document.email_invitation(
|
||||
language, access.user.email, access.role, self.request.user.email
|
||||
language,
|
||||
access.user.email,
|
||||
access.role,
|
||||
self.request.user,
|
||||
)
|
||||
|
||||
|
||||
@@ -778,6 +782,7 @@ class InvitationViewset(
|
||||
invitation = serializer.save()
|
||||
|
||||
language = self.request.headers.get("Content-Language", "en-us")
|
||||
|
||||
invitation.document.email_invitation(
|
||||
language, invitation.email, invitation.role, self.request.user.email
|
||||
language, invitation.email, invitation.role, self.request.user
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user