Spaces: candidate dropdown/autocomplete for the member picker (needs user enumeration) #226
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up split from #217. The member-add field now validates (already-member/owner) and gives feedback (PR #225), but the candidate dropdown + type-ahead was deferred because it needs an enumerable list of users, which OIDC-without-an-admin-client (the openbao dogfood) doesn't provide.
To add later:
GET /api/v1/users(or/spaces/{name}/candidates) returning known usernames: local users from the local-users store, and/or users via the read-only IdP client (#215's read client) when configured. Empty when no source is enumerable.<datalist>tomembersdlg-userfed by that endpoint (native type-ahead), filtering out current members. Degrades to the validated free-text field when the list is empty.Low priority — the validated text field already covers the core UX everywhere; this is autocomplete polish for instances that can enumerate users.
Shipped in v0.6.19 (PR #230, CI-green, squash-merged).
Backend:
GET /api/v1/spaces/{name}/candidates(owner-or-admin gated) returns the usernames the instance can enumerate, minus the owner and current members (server-filtered), sorted + deduped. Source resolution: an injectedSpacesAPI.Candidatesenumerator if set; otherwiseManager.Users(realm users viaGET /users?...view-users) on IdP-managed instances; otherwise empty. Nomain.gowiring needed for the IdP path.Frontend: a
<datalist>on the add-member input, populated on dialog open. Degrades to the validated free-text picker (#217) when the list is empty.Tests (CI):
spaces_candidates_test.go(owner/member exclusion + sort, non-owner 403, empty-when-no-source) andspaces.TestUsers(enumeration).Deployed + boot-confirmed v0.6.19 on both dogfoods:
/candidatesreturns empty → field degrades to validated free-text, exactly as designed.The redeploy logged out active sessions (in-memory), so the dropdown itself is best eyeballed on next login; the logic is CI-covered. Closing.