feat: assign custom roles in user management

This commit is contained in:
Gabriel20xx committed 2026-10-13 18:08:42 +00:00
1 parent 6388efd6d6
commit 0783b74da7
8 files changed
+72 -68

No files matched your search

-5
View File
@@ -1,5 +0,0 @@
---
"@gabriel20xx/web-ui": minor
---
`UserManagement` accepts an optional `projects` prop (`KnownProject[]`): when present, each account gets a per-project login-access picker (checkboxes in the edit row, a summary in the read-only row) and `onUpdate` receives a `projects: string[]` field. Only AuthGuard's own admin UI passes this prop today; every other consumer is unaffected.
+5
View File
@@ -0,0 +1,5 @@
---
"@gabriel20xx/web-ui": minor
---
`UserManagement` accepts an optional `roles` prop (`KnownRole[]`) in place of the `projects` prop it replaces: when present, each account gets a role picker (checkboxes in the add and edit rows, the role names in the read-only row), and `onCreate`/`onUpdate` receive a `roleIds: number[]` field. An account's projects now come from its roles, so per-account project checkboxes are gone. `ManagedUser` carries `roleIds` instead of `projects`. Only AuthGuard's own admin UI passes this prop today; every other consumer is unaffected.