Skip to content

Admin account-request email omits the requester's name #7595

Closed

Description

@aicam

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:

  1. 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.
  2. 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.
  3. But getValues() returns only affiliation and reason — registration-request-modal.component.ts:49-54.
  4. So notifyUnauthorizedLogin() POSTs only { receiver, affiliation, reason } — frontend/src/app/common/service/gmail/gmail.service.ts:52-54.
  5. EmailMessage has no name field and userRegistrationNotification never renders one — amber/src/main/scala/org/apache/texera/web/resource/GmailResource.scala:39-45 and amber/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?

  1. Deploy with inviteOnly enabled and at least one ADMIN user with a valid email.
  2. Log in with a Google account that has no approved Texera account (role INACTIVE).
  3. 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.
  4. 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

  1. added theissue type on Aug 12, 2026
  2. changed the issue type fromtoon Aug 12, 2026
  3. changed the issue type fromtoon Aug 12, 2026
  4. anthonychengit commented on Aug 13, 2026

    @anthonychengit
    Contributor

    /take

  5. added a commit that references this issue on Aug 30, 2026
    98588bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions