Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add username and email user search filters - #27922

Merged
ethanndickson merged 9 commits into
coder:mainfrom
wyattfry:wf/user-email-search
Aug 16, 2026
Merged

feat: add username and email user search filters#27922
ethanndickson merged 9 commits into
coder:mainfrom
wyattfry:wf/user-email-search

Conversation

@wyattfry

@wyattfry wyattfry commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

User search can now resolve exact email: and username: terms through GET /api/v2/users instead of only supporting fuzzy free-text matches. The database query already had exact email and username filters; this wires the public search parser and API handler to those filters so clients can ask for a single user by email without fetching every user or depending on substring matching.

This is the API half of coder/terraform-provider-coderd#403: that provider PR adds data.coderd_user.email, and this PR gives it an efficient exact lookup path.

Testing

  • go test ./coderd/searchquery -run '^TestSearchUsers$' -count=1
  • go test ./coderd -run '^TestGetUsersFilter$' -count=1
  • Live API test:
    • Built local enterprise Coder from this branch.
    • Started Coder on http://127.0.0.1:39991 against a clean Postgres database.
    • Created [email protected].
    • Verified GET /api/v2/users?q=email:[email protected]&limit=2 returned exactly one user:
{
  "count": 1,
  "users": [
    {
      "id": "efc6f909-ce0a-4731-bd2f-6e4df417aaa7",
      "username": "lookup-target",
      "email": "[email protected]"
    }
  ]
}

flow.ai
Codex

@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@wyattfry

wyattfry commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

cdrci2 added a commit to coder/cla that referenced this pull request Aug 6, 2026
@wyattfry
wyattfry force-pushed the wf/user-email-search branch from c2143e3 to 3f5764c Compare August 6, 2026 14:23
@wyattfry

wyattfry commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

recheck

@wyattfry

Copy link
Copy Markdown
Contributor Author

@ethanndickson could you take a look pls?

@ethanndickson ethanndickson changed the title fix(coderd): support exact user email search feat: add username and email user search filters Aug 16, 2026
@ethanndickson
ethanndickson self-requested a review August 16, 2026 12:35

@ethanndickson ethanndickson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR!

@ethanndickson
ethanndickson merged commit a005e5c into coder:main Aug 16, 2026
29 of 31 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants