Repository navigation
Description
What happened?
When an unapproved user requests access on an invite-only deployment, the notification email sent to admins contains only the requester's Email, Affiliation, and Reason — the user's name is missing, even though we already have it.
Example of an email an admin received:
A new user has attempted to log in or register, but their account is not yet approved.
Please review the account request for the following user:
Email: <user>@gmail.com
Affiliation:
Reason:
The name is available at every step, it is just never carried into the email:
- The name comes from the Google login (
googleName) and is persisted on the user record —amber/src/main/scala/org/apache/texera/web/resource/auth/GoogleAuthResource.scala:78-104. - The registration modal even displays it in a disabled "Name" field —
frontend/src/app/common/service/user/registration-request-modal/registration-request-modal.component.html:31-35. - But
getValues()returns onlyaffiliationandreason—registration-request-modal.component.ts:49-54. - So
notifyUnauthorizedLogin()POSTs only{ receiver, affiliation, reason }—frontend/src/app/common/service/gmail/gmail.service.ts:52-54. EmailMessagehas nonamefield anduserRegistrationNotificationnever renders one —amber/src/main/scala/org/apache/texera/web/resource/GmailResource.scala:39-45andamber/src/main/scala/org/apache/texera/web/resource/EmailTemplate.scala:58-72.
Expected: the admin email includes the requester's name alongside their email, so admins can identify who is asking for access without opening the admin panel.
How to reproduce?
- Deploy with
inviteOnlyenabled and at least oneADMINuser with a valid email. - Log in with a Google account that has no approved Texera account (role
INACTIVE). - The "Request access" modal appears, pre-filled with the account's name and email; fill in Affiliation and Reason and click Send request to Admin.
- Check the admin's inbox: the "New Account Request Pending Approval" email lists Email / Affiliation / Reason, but no name.
Proposed fix
Add the name to the admin email template. Preferably resolve it server-side in GmailResource.notifyUnauthorizedUser by looking the user up by email (the record already exists at this point, with the Google name stored), rather than accepting a client-supplied name — that avoids trusting a value from the browser and keeps the frontend payload unchanged. Then render a Name: line in EmailTemplate.userRegistrationNotification, following the existing Affiliation/Reason pattern with a "Not provided" fallback, and update EmailTemplateSpec accordingly.
Version/Branch
1.3.0-incubating-SNAPSHOT (main)
What browsers are you seeing the problem on?
Chrome
Relevant log output
N/A — the email content itself is the evidence (see above).
Activity
anthonychengit commentedon Aug 13, 2026
/take
feat(amber): include requester name in account email (apache#7639)