feat(team): admin invitations management UI (PMS-247) #115

Merged
longjacksonle merged 2 commits from feat/mapps-247-invitations-ui into main 2026-06-11 19:22:53 +02:00

What

The SPA surface for the PMS-244/246 invitations API (mokosh-apps phase of the Mokosh-owned org membership work). Admins can grow an org from the app instead of raw API calls.

How

New admin page at /admin/team (sidebar: Admin -> Team), gated on the admin/super_admin role like the other admin surfaces:

  • Invite form (email + role) -> POST /invitations.
  • Pending invitations table from GET /invitations.
  • Per-row Revoke -> DELETE /invitations/{id}.

Each mutation restarts the resource so the list reflects the change; server errors (e.g. a rejected role) surface inline. Non-admins see a "need an admin role" notice. Acceptance stays login-driven server-side (PMS-244) - the page only issues invites; the invitee joins on their next sign-in.

Verification

cargo check --target wasm32-unknown-unknown, cargo clippy --target wasm32-unknown-unknown, cargo fmt --check all clean. (A pre-existing manual checked division warning in projects.rs is a host-only rust-1.95 lint, unrelated.)

🤖 Generated with Claude Code

## What The SPA surface for the PMS-244/246 invitations API (mokosh-apps phase of the Mokosh-owned org membership work). Admins can grow an org from the app instead of raw API calls. ## How New admin page at `/admin/team` (sidebar: Admin -> Team), gated on the `admin`/`super_admin` role like the other admin surfaces: - Invite form (email + role) -> `POST /invitations`. - Pending invitations table from `GET /invitations`. - Per-row Revoke -> `DELETE /invitations/{id}`. Each mutation restarts the resource so the list reflects the change; server errors (e.g. a rejected role) surface inline. Non-admins see a "need an admin role" notice. Acceptance stays login-driven server-side (PMS-244) - the page only issues invites; the invitee joins on their next sign-in. ## Verification `cargo check --target wasm32-unknown-unknown`, `cargo clippy --target wasm32-unknown-unknown`, `cargo fmt --check` all clean. (A pre-existing `manual checked division` warning in `projects.rs` is a host-only rust-1.95 lint, unrelated.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Adds the SPA surface for the PMS-244/246 invitations API so admins can grow an org from the app instead of raw API calls.

New admin page at `/admin/team` (nav: Admin -> Team, gated on the admin/super_admin role like the other admin surfaces): an invite form (email + role) that POSTs `/invitations`, a table of pending invitations from `GET /invitations`, and a per-row Revoke that DELETEs `/invitations/{id}`. Each mutation restarts the resource so the list reflects the change, and the form surfaces server errors (e.g. a rejected role) inline. Non-admins get a "need an admin role" notice rather than the management UI.

Acceptance stays login-driven server-side (PMS-244): the page just issues invites; the invitee joins on their next sign-in.

Verification: `cargo check --target wasm32-unknown-unknown`, `cargo clippy --target wasm32-unknown-unknown`, and `cargo fmt --check` all clean. (A pre-existing `manual checked division` warning in projects.rs is a host-only rust-1.95 lint, unrelated.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chore: drop accidentally-committed local CLAUDE.md from PMS-247 branch
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 51s
c72a2352aa
longjacksonle deleted branch feat/mapps-247-invitations-ui 2026-06-11 19:22:53 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!115
No description provided.