feat(licenses): search keys by customer, domain, key number, or email #392

Closed
opened 2026-06-01 09:32:59 +00:00 by jmiller · 2 comments
Owner

Summary

Add a search bar to the licenses page that allows searching across all key fields — customer name, email, domain restriction, key prefix/raw, and payment reference.

Implementation

  • Server-side search via ?q= query parameter
  • SQL LIKE across 6 fields: key_prefix, key_raw, licensee_name, licensee_email, domain_restriction, payment_ref
  • Case-insensitive (LOWER + LIKE)
  • Available on both repo and org license pages
  • Scoped to org/repo owner — users can only search within their org
  • Search results count shown below search bar
  • Clear button to reset search

Test Plan

  • Search by customer name → finds matching keys
  • Search by domain (e.g. example.com) → finds keys with that domain restriction
  • Search by key prefix (e.g. MOKO-A1B2) → finds the key
  • Search by email → finds matching keys
  • Search with no results → shows "No keys match" message
  • Clear search → returns to full list
  • URL is shareable (e.g. /licenses?q=example)
  • Non-member cannot search another org's keys

🤖 Generated with Claude Code

## Summary Add a search bar to the licenses page that allows searching across all key fields — customer name, email, domain restriction, key prefix/raw, and payment reference. ## Implementation - Server-side search via `?q=` query parameter - SQL `LIKE` across 6 fields: key_prefix, key_raw, licensee_name, licensee_email, domain_restriction, payment_ref - Case-insensitive (LOWER + LIKE) - Available on both repo and org license pages - Scoped to org/repo owner — users can only search within their org - Search results count shown below search bar - Clear button to reset search ## Test Plan - [ ] Search by customer name → finds matching keys - [ ] Search by domain (e.g. example.com) → finds keys with that domain restriction - [ ] Search by key prefix (e.g. MOKO-A1B2) → finds the key - [ ] Search by email → finds matching keys - [ ] Search with no results → shows "No keys match" message - [ ] Clear search → returns to full list - [ ] URL is shareable (e.g. /licenses?q=example) - [ ] Non-member cannot search another org's keys 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Testing Plan — License Key Search

API (server-side search via ?q=)

  • GET /licenses?q=John → returns keys with licensee "John"
  • GET /licenses?q=example.com → returns keys with that domain
  • GET /licenses?q=MOKO-A1B2 → returns that specific key
  • GET /licenses?q=john@example → returns keys by email
  • GET /licenses?q=stripe_pi → returns keys by payment ref
  • GET /licenses?q=nonexistent → returns empty, shows "No keys match" message
  • Case-insensitive: ?q=john matches "John Doe"
  • Search scoped to org — cannot see other org's keys

GUI

  • Search bar appears above keys table
  • Typing and submit filters the list
  • Result count message: "Found N key(s) matching ..."
  • Clear button resets to full list
  • URL is shareable: /licenses?q=example
  • Both repo and org pages have search

🤖 Generated with Claude Code

## Testing Plan — License Key Search ### API (server-side search via ?q=) - [ ] GET /licenses?q=John → returns keys with licensee "John" - [ ] GET /licenses?q=example.com → returns keys with that domain - [ ] GET /licenses?q=MOKO-A1B2 → returns that specific key - [ ] GET /licenses?q=john@example → returns keys by email - [ ] GET /licenses?q=stripe_pi → returns keys by payment ref - [ ] GET /licenses?q=nonexistent → returns empty, shows "No keys match" message - [ ] Case-insensitive: ?q=john matches "John Doe" - [ ] Search scoped to org — cannot see other org's keys ### GUI - [ ] Search bar appears above keys table - [ ] Typing and submit filters the list - [ ] Result count message: "Found N key(s) matching ..." - [ ] Clear button resets to full list - [ ] URL is shareable: /licenses?q=example - [ ] Both repo and org pages have search 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmiller added the pending: testing label 2026-06-01 10:13:55 +00:00
jmiller reopened this issue 2026-06-02 11:21:43 +00:00
Author
Owner

Tested and verified in production on MokoWaaS. All three download gating modes (none/prerelease/all), feed visibility, XML metadata, download URLs, and access control confirmed working.

Tested and verified in production on MokoWaaS. All three download gating modes (none/prerelease/all), feed visibility, XML metadata, download URLs, and access control confirmed working.
Sign in to join this conversation.
No labels pending: testing
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoGitea#392