Skip to content

Unify admin user search with email lookup - #491

Merged
leesheppard merged 2 commits into
mainfrom
fix/update-user-lookup
Jul 21, 2026
Merged

Unify admin user search with email lookup#491
leesheppard merged 2 commits into
mainfrom
fix/update-user-lookup

Conversation

@leesheppard

Copy link
Copy Markdown
Member

Resolves an issue with looking up users in the Admin dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes Admin dashboard/user lookup by centralizing user searching into a User.search scope that searches by name and associated Email records, and then reusing that scope across admin controllers.

Changes:

  • Added a User.search scope to support searching users by name or email (via the Email model).
  • Updated Admin dashboard and Admin user search endpoints to use the shared User.search scope.
  • Added a request spec covering Admin dashboard search by name and by email.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spec/requests/admin/dashboard_spec.rb Adds request coverage for dashboard user search by name/email.
app/models/user.rb Introduces User.search scope used by admin search flows.
app/controllers/admin/users_controller.rb Reuses User.search for the JSON user search endpoint.
app/controllers/admin/memberships_controller.rb Updates membership filtering to support email lookup via Email user_ids.
app/controllers/admin/dashboards_controller.rb Switches dashboard search filtering to use User.search.

Comment thread app/models/user.rb
@ruby-au
ruby-au temporarily deployed to ruby-org-au-fix-update--ntlat8 July 21, 2026 05:15 Inactive
@leesheppard
leesheppard temporarily deployed to ruby-org-au-fix-update--ntlat8 July 21, 2026 05:54 Inactive
@leesheppard
leesheppard merged commit 09c796b into main Jul 21, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in RubyAU Community PM Jul 21, 2026
@leesheppard
leesheppard deleted the fix/update-user-lookup branch July 21, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants