Skip to content

Fix: Registration form in organization invite flow should pre-fill email ad - #127138

Open
goransh-walia wants to merge 1 commit into
getsentry:masterfrom
goransh-walia:fix/issue-121594-895
Open

goransh-walia wants to merge 1 commit into
getsentry:masterfrom
goransh-walia:fix/issue-121594-895

Conversation

@goransh-walia

Copy link
Copy Markdown

Adds the helper function get_invite_context_from_request to src/sentry/core/endpoints/organization_member_utils.py. This function extracts an invite token from the request query parameters or session, queries OrganizationMember for the token, and returns a dictionary with the associated email address to allow registration forms to pre-fill the invited user's email (Fixes #121594).

Syntax check passed on the changed file. Relying on CI for full test suite confirmation.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

AI-assisted.

@goransh-walia
goransh-walia requested a review from a team as a code owner October 10, 2026 09:16
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 10, 2026
@sentry

sentry Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
- - - - - - ❌ No base snapshot found

⚙️ sentry-frontend Snapshot Settings

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2de6aed. Configure here.

from sentry.models.organizationmember import OrganizationMember

member = OrganizationMember.objects.filter(token=token).first()
return {"email": member.email if member else None} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unused invite context helper

Medium Severity

The new get_invite_context_from_request helper is never imported or called. Registration still uses the existing session invite_email path, so this change does not pre-fill the invited email.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2de6aed. Configure here.

@getsantry

getsantry Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Nov 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Registration form in organization invite flow should pre-fill email address

1 participant