Commit b61afc1
* fix(plugin-security,spec): PERMISSION_DENIED stops showing developer copy to end users (#7414)
The 403 refusal is correct and its transport is fine; the message was not.
`Error.message` is the body's human-readable string on every transport and
Console renders it verbatim in a toast, so a business user in a localized app
got an English sentence naming an object API name they had never seen and
ending in `positions [org_member, everyone]`.
The error now carries two messages because it has two audiences:
- `message` — the user's half, rendered in `ExecutionContext.locale` through
the SHARED operation-message catalog #7307 built (`errors.permission_denied`).
It names no object, no operation and no position, in any shipped locale.
- `developerMessage` — the developer's half, the previous sentence byte for
byte. LOGGED at the throw site rather than shipped: unlike the 409, this
body carries no structured API names, so shipping it would have added a
disclosure instead of removing one. It is a sibling of `details`, never a
member of it, because `details` is what the dispatcher serialises.
`code` / `statusCode` / `details` unchanged; one PERMISSION_DENIED (ADR-0112),
two sentences.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BM1tNf5U3nEbHKR4fo5qVQ
* test(plugin-security,spec): pin the new engine double to the producer's dispatch predicates (#7414)
`check:engine-double-contract` caught the new fixture's `delete()`/`update()`
being looser than `ObjectQL`'s — a fake that accepts call shapes the engine
refuses collects greens the producer would not. Both verbs now open with
`assertEngineDeleteDispatch` / `assertEngineUpdateDispatch` from
`@objectstack/metadata-core`.
Also corrects the flag on the catalog's placeholder case: reverse verification
measured it going RED on a reverted catalog (it reads the ENTRY, not the
rendering), so the comment claiming it cannot bite was wrong.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BM1tNf5U3nEbHKR4fo5qVQ
* test(runtime): re-spell the share-links 403 pin for the localized message (#7414)
`share-links-enforcement-context.test.ts` drives the REAL security gate and
asserted `toContain('Access denied')` on the message. That string is now the
developer half (logged, not shipped); the message is the catalog's user-facing
sentence. Re-spelled against `BUILTIN_OPERATION_MESSAGES.en.permission_denied`
so the case keeps its stated purpose — proving an authorization answer reached
the client rather than being swallowed into the generic internal-error string —
without needing another re-spell on the next copy edit.
Found by CI, not by the local sweep: the rule's consumption radius is wider than
the edited package.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BM1tNf5U3nEbHKR4fo5qVQ
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 91eddca commit b61afc1
10 files changed
Lines changed: 722 additions & 7 deletions
File tree
- .changeset
- packages
- plugins/plugin-security
- src
- rest/src
- runtime/src/domains
- spec/src/system
| 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 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
7 | 25 | | |
8 | 26 | | |
9 | 27 | | |
10 | 28 | | |
11 | 29 | | |
12 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
13 | 37 | | |
14 | 38 | | |
15 | 39 | | |
| 40 | + | |
16 | 41 | | |
17 | 42 | | |
18 | 43 | | |
| |||
0 commit comments