Skip to content

Expand user search fields#226

Merged
jvendetti merged 7 commits into
developfrom
feature/expand-user-search/225
May 19, 2026
Merged

Expand user search fields#226
jvendetti merged 7 commits into
developfrom
feature/expand-user-search/225

Conversation

@jvendetti
Copy link
Copy Markdown
Member

@jvendetti jvendetti commented May 13, 2026

Summary

  • Preserve existing /users?search= behavior: default search remains username-only for backward compatibility.
  • Add optional search_fields param so clients can opt into searching specific fields: username, email, firstName, and/or lastName.
  • Add search_fields=all shorthand for searching all supported user search fields.
  • Reject mixed all values such as search_fields=all,email; all must be used by itself.
  • Add users controller tests for the username-only default, opt-in broad search, strict all handling, and no-match pagination metadata.
  • Skip Minitest::Reporters when tests are launched from RubyMine so IDE test runs can use RubyMine's reporter.
  • Fix some RuboCop warnings

Notes

BioPortal Admin Users can pass search_fields=all to search across all user table fields. Existing clients, including remote account pickers that expect username-only matching, can omit search_fields.

Verification

  • ruby -c helpers/users_helper.rb
  • ruby -c test/controllers/test_users_controller.rb
  • bundle exec ruby test/controllers/test_users_controller.rb

Closes #225

@jvendetti jvendetti marked this pull request as ready for review May 15, 2026 22:36
@jvendetti jvendetti merged commit 5aa9d49 into develop May 19, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant