Commit e415e91
committed
docs(auth): the org-role vocabulary is closed — correct the mirror's standing instruction (framework ADR-0108)
`org-roles.ts` told the next maintainer "a role added server-side must be
added HERE too". There are no server-side additions left to chase.
The framework used to register every declared `position` / `permission` name
as an organization role, so this list could always fall behind the server's.
That channel was retired (framework ADR-0108, objectstack#3723): every value
stored in `sys_member.role` is projected into `current_user.positions`, so a
business role handed out that way was capability carrying none of the position
system's controls. `sys_member.role` is now a closed, framework-owned list of
owner / admin / delegated_admin / member; an app's business roles are
positions, granted through `sys_user_position` or an invitation's placement
(framework ADR-0105 D8).
The mirror is therefore complete by construction rather than by vigilance. No
behaviour change — the four names and labels are what they already were.
Still a mirror rather than a derivation, but for a packaging reason now, not a
design one: the names live in `@objectstack/spec` as
`BUILTIN_MEMBERSHIP_ROLES`, which `@object-ui/auth` cannot import yet (this
package takes no dependency on `@objectstack/spec`, and the constants are
absent from the published 16.1.0 — they ship with the first ADR-0108 release).
The doc records the exact swap for when it can. A new test pins the list to
those four in display order so drift fails loudly instead of silently offering
a value the server's enforced select rejects.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186LhwkUBupmLJUUAMda5hU1 parent e05f052 commit e415e91
4 files changed
Lines changed: 78 additions & 9 deletions
File tree
- .changeset
- packages/auth/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
25 | 44 | | |
26 | 45 | | |
27 | 46 | | |
| |||
0 commit comments