feat: add Role (owner|admin) to the user domain, persistence model and mapper
This commit is contained in:
1 parent
162fea4afb
commit
461e93e3b5
30 files changed
+791
-48
No files matched your search
@@ -12,9 +12,10 @@ Feature: Users screen and InviteUserModal
|
||||
And UsersPage calls GET /v1/user/ once per navigation, and InviteUserModal sends POST
|
||||
/v1/user/invite; both endpoints already exist (features/invitations.feature) and this slice
|
||||
wires the SPA to them unchanged, with no Go change
|
||||
And the list items keep the API shape: kind "user" (id, username, display_name, status
|
||||
"accepted", created_at) or kind "invite" (id, email, status "pending" or "expired",
|
||||
created_at); the list is used in the order the API returns it (created date, newest first),
|
||||
And the list items keep the API shape: user items are kind "user" (id, username, display_name,
|
||||
email, role, status "accepted", created_at) or kind "invite" (id, email, status "pending" or
|
||||
"expired", created_at); SPA display of role, owner-only actions and the redesigned columns is
|
||||
a later SPA slice; this amendment covers the API shape only; the list is used in the order the API returns it (created date, newest first),
|
||||
and rows are keyed by kind and id, because a user and an invite can share a numeric id
|
||||
And DashboardShell's navigation gains "Users" (icon users, linking to /users) between
|
||||
"Articles" and "Integration", in the sidebar and in the mobile drawer, so it lists Home,
|
||||
@@ -36,7 +37,7 @@ Feature: Users screen and InviteUserModal
|
||||
And a user row's name cell shows the display name first (medium weight, highlighted) with the
|
||||
username beside it in muted text when display_name is not empty, otherwise the username
|
||||
alone (medium weight, highlighted); an invite row shows the email address in regular weight,
|
||||
toned; an accepted user is never shown by email
|
||||
toned
|
||||
And the row whose kind is "user" and whose id equals the session user's id (from GET
|
||||
/v1/auth/me) carries a muted mono "you" tag after the name
|
||||
And InviteStatusBadge shows icon and word, never color alone: Accepted (circle-check, success
|
||||
@@ -101,7 +102,6 @@ Feature: Users screen and InviteUserModal
|
||||
And the third row shows "Inès Duarte" first with "ines" beside it in muted text, an Accepted
|
||||
badge and "18 Jun 2026"
|
||||
And the fifth row shows "marta" with the "you" tag, an Accepted badge and "12 Mar 2026"
|
||||
And no row shows an email address for an accepted user
|
||||
And below md the same rows render as cards, each with the name line, then the badge and
|
||||
"Created {date}"
|
||||
|
||||
|
||||
Reference in new issue
Block a user