Skip to content

User search on manage members#616

Merged
eyeseast merged 37 commits intomasterfrom
474-user-search
Apr 28, 2026
Merged

User search on manage members#616
eyeseast merged 37 commits intomasterfrom
474-user-search

Conversation

@eyeseast
Copy link
Copy Markdown
Collaborator

@eyeseast eyeseast commented Mar 10, 2026

Closes #474

Screenshot 2026-04-24 at 4 14 20 PM Screenshot 2026-04-24 at 4 14 04 PM Screenshot 2026-04-24 at 4 14 20 PM

Summary

  • Add three-state user privacy (public / private / hidden) with signals to
    auto-unhide users on email verification or payment
  • Expose privacy toggle in user profile settings
  • Add user search API endpoint (GET /fe_api/users/?search=) with visibility filtering
  • Build UserSelect Svelte component (Svelecte-based, supports both user search
    and raw email entry) and wire it into the org invite-members form
  • Progressive enhancement: form falls back to plain email input without JS
  • Invitations with existing accounts show user info, not email in invites list

Test plan

  • Verify hidden users don't appear in search results for non-staff
  • Verify private users appear only to org-mates
  • Verify staff sees all users
  • Test email verification signal flips hidden=False
  • Test UserSelect component: search, select user, type email, remove chip
  • Test invitation POST sends email for both user-type and email-type selections
  • Test no-JS fallback still works via Django form POST

@allanlasser allanlasser temporarily deployed to squarelet-pi-474-user-s-shxsaf March 10, 2026 17:43 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 10, 2026 18:10 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 10, 2026 18:49 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 10, 2026 18:50 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 10, 2026 19:26 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 10, 2026 21:03 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 11, 2026 13:47 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 11, 2026 15:13 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 11, 2026 20:29 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 12, 2026 01:03 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 12, 2026 01:36 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 12, 2026 13:07 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 16, 2026 15:11 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 16, 2026 15:13 Inactive
@eyeseast eyeseast marked this pull request as ready for review March 16, 2026 15:32
@eyeseast eyeseast requested review from allanlasser and duckduckgrayduck and removed request for allanlasser March 16, 2026 15:32
Copy link
Copy Markdown
Member

@allanlasser allanlasser left a comment

Choose a reason for hiding this comment

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

Dropping some notes on backend before moving into frontend review. There's some critical decisions in migration 0060 we should discuss.

Comment thread squarelet/users/tests/test_signals.py Outdated
Comment thread squarelet/users/tests/test_signals.py Outdated
Comment thread squarelet/users/signals.py Outdated
vector = SearchVector("username", "name")
query = SearchQuery(f"{search}:*", search_type="raw")
qs = qs.annotate(search=vector).filter(search=query)
return qs
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.

This is currently in our private frontend API, but this feels like a strong candidate for inclusion in the public accounts API. For our efforts to align our permissions and sharing model across products, a single endpoint for consistently searching accounts feels extemely useful. I'm going to flag this in that project as a backreference.

Comment thread squarelet/users/fe_api/test_user_viewsets.py
Comment thread squarelet/organizations/migrations/0060_populate_hidden.py Outdated
Comment thread squarelet/organizations/migrations/0060_populate_hidden.py
Comment thread squarelet/organizations/migrations/0060_populate_hidden.py Outdated
Comment thread plans/474-user-search.md Outdated
Comment thread squarelet/organizations/fe_api/viewsets.py Outdated
Copy link
Copy Markdown
Member

@allanlasser allanlasser left a comment

Choose a reason for hiding this comment

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

Ok, done with frontend review. Contributing a commit with some style tweaks on the input. Going to flag this as changes requested due to comments on backend files.

Comment thread frontend/views/organization_managemembers.svelte.ts Outdated
Comment thread frontend/components/UserSelect.svelte Outdated
@allanlasser allanlasser temporarily deployed to squarelet-pi-474-user-s-shxsaf March 20, 2026 18:58 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 12:37 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 12:38 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 15:50 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 16:18 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 16:31 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 18:40 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 18:44 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-shxsaf March 24, 2026 19:59 Inactive
@eyeseast eyeseast temporarily deployed to squarelet-pi-474-user-s-lynbka April 17, 2026 14:33 Inactive
@eyeseast eyeseast merged commit 513646f into master Apr 28, 2026
6 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.

Search existing users when creating org membership invitations

3 participants