Commit 116a3ed
committed
refactor(metadata-core): drop sys_view_definition's all-six apiMethods whitelist (#3026)
#3745 completed this object's boilerplate CRUD-five whitelist to all six
primitives so its batch routes stopped 405-ing. A whitelist naming all six is
equivalent to no whitelist — except it stops tracking primitives the enum grows
later — so the #3543 audit rule ("delete the equivalent-to-open boilerplate")
applies and the declaration goes.
No behaviour change: `undefined` resolves to `unrestricted`, whose effective
operation set is identical to `restricted` holding all six primitives.
Removing it is safe HERE specifically because the object has no `managedBy`:
`reconcileManagedApiMethods` (ADR-0103 D3) early-returns on a non-array
`apiMethods`, so for a managed object an absent whitelist would take the
managed-write backstop with it. That is why the RBAC objects reclaimed by #3745
keep their explicit arrays and this one does not — the two treatments are not
inconsistent, they follow the presence of a backstop.
The object's test is rewritten to guard the new shape in both directions
(whitelist must stay absent; the resolver must report `unrestricted`) and to
pin the derived verbs the contract grants it.
Verified end-to-end against a real running server (showcase, seeded admin), not
only by unit test: 14/14 checks over the live REST surface, including this
object's deleteMany reaching the engine rather than the API gate, derived
import/export on a whitelist-free object, a tightened object still answering
405, and apiEnabled:false still answering 404 ahead of the method gate.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CkdX2VCuKfcsFBbvtATe7V1 parent 307e0fe commit 116a3ed
3 files changed
Lines changed: 53 additions & 25 deletions
File tree
- .changeset
- packages/metadata-core/src/objects
| 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 | + | |
Lines changed: 28 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
0 commit comments