feat(enclave): user-groups CRUD UI #144
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-83-user-groups-ui"
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?
Stacks on #143 (
feat/lc-83-user-groups). PR #143 shipped the per-enclave user-groups API and the@group-namemention expansion but deliberately skipped the UI, so admins could only manage groups via curl. This adds the UI to the existing enclave-settings page.What you get:
User groupssection belowCustom emojison/enclave/{id}/settingslisting every group, member count, and a label chip per member (display_name or@username, resolved server-side).Add memberform per group, taking a user id.hx-delete(HTML forms cannot issue DELETE) withhx-confirmand a post-request soft reload.Handler changes:
routes/user_groups.rsnow returnsRedirect::to("/enclave/{id}/settings")from every mutation instead of bare200, so plain HTML forms (create, add-member) land back on the settings page. Existing tests updated fromOKtoSEE_OTHER.routes/enclave.rs::get_settingsresolves group member labels (looks up display_name / username) once and passes them to the template.views/enclave.rsgains anEnclaveGroupViewand agroupsfield onEnclaveSettingsPage.Validated with
just check(server, desktop, clippy both feature sets, fmt) and theroutes_user_groupsintegration suite (3/3 passing). Not landing the member-remove button this PR; the per-member chip render is read-only for now and follows in a small follow-up if anyone asks.