Admin: roles, users and role assignment pages (#44 slice B) #134

Closed
opened 2026-10-30 08:14:22 +01:00 by amiryahaya · 1 comment
Owner

Slice B of #44 (web). Depends on the API issue "Admin API: roles, users and role assignment" (nothing to build until its operations exist in the OpenAPI spec).

Scope

Pages in web/apps/admin on the #43/#44/#46 foundation (shell, useAccess, @kws/ui kit, shared api.ts/forms.ts): a Roles list and editor (name, description, permission checklist from the catalog; system roles read-only), a Users list with search and a user page showing memberships and roles, and a role-assignment form. Menu entries gated by the new permission key(s).

Notes from earlier slices

  • Same query rules (staleTime: Infinity, no focus/reconnect refetch, retry: false, refetch on mount), fixed error texts, version conflicts with Reload that keeps untouched fields, double-submit guard, 44 px targets, mocked Playwright in the admin suite.
  • Hide what the user's grants cannot do; the server decides. Never show or log emails outside the page that needs them.
  • Granting beyond one's own permissions is refused by the API: show a fixed message.

Decisions (owner, 2026-10-30)

Platform scope only (organization roles/members are the partner portal's, #49). Only an admin deactivates a user or removes their membership. Staff are invited by email only: the Users page needs an "Invite staff" form (email + roles), a pending-invitations list with delete, and no way to add a user who has not accepted an invitation.

Slice B of #44 (web). Depends on the API issue "Admin API: roles, users and role assignment" (nothing to build until its operations exist in the OpenAPI spec). ## Scope Pages in `web/apps/admin` on the #43/#44/#46 foundation (shell, `useAccess`, `@kws/ui` kit, shared `api.ts`/`forms.ts`): a Roles list and editor (name, description, permission checklist from the catalog; system roles read-only), a Users list with search and a user page showing memberships and roles, and a role-assignment form. Menu entries gated by the new permission key(s). ## Notes from earlier slices - Same query rules (`staleTime: Infinity`, no focus/reconnect refetch, `retry: false`, refetch on mount), fixed error texts, `version` conflicts with Reload that keeps untouched fields, double-submit guard, 44 px targets, mocked Playwright in the admin suite. - Hide what the user's grants cannot do; the server decides. Never show or log emails outside the page that needs them. - Granting beyond one's own permissions is refused by the API: show a fixed message. ## Decisions (owner, 2026-10-30) Platform scope only (organization roles/members are the partner portal's, #49). Only an admin deactivates a user or removes their membership. Staff are invited by email only: the Users page needs an "Invite staff" form (email + roles), a pending-invitations list with delete, and no way to add a user who has not accepted an invitation.
amiryahaya added this to the P4 Web.Admin milestone 2026-10-30 08:14:22 +01:00
Author
Owner

Status 2026-10-31: unblocked. The API (#133 slices A and B) is merged, so the web pages for roles, users, assignment and staff invitations can start. Also needed: the /accept-invitation page (the invitation email links to <admin_portal_url>/accept-invitation#&e=). The portal now has a no-access page (PR #140). Note for the e2e: the dev mock IdP has no sign-up screen, and the real local Zitadel needs a mail server for the invitee's verification code.

Status 2026-10-31: unblocked. The API (#133 slices A and B) is merged, so the web pages for roles, users, assignment and staff invitations can start. Also needed: the /accept-invitation page (the invitation email links to <admin_portal_url>/accept-invitation#<token>&e=<email>). The portal now has a no-access page (PR #140). Note for the e2e: the dev mock IdP has no sign-up screen, and the real local Zitadel needs a mail server for the invitee's verification code.
Sign in to join this conversation.
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
primatekuntech/kws#134
No description provided.