Commit 1c07e6a
authored
fix(app-shell)!: the server-action URL identifies an action by
serverActionHandler posted `action.target || action.name` — the handler's
registration KEY — to /api/v1/actions/:object/:action. The server resolves the
declaration by NAME, so for a target-bound action it resolved none and
silently skipped both the ADR-0066 D4 capability gate and the ADR-0104 param
contract: a button correctly hidden from users without the capability posted
to an endpoint that accepted anyone (objectstack#3935).
target is a binding expression — a handler key here, a flow id for
type:'flow', a URL for type:'url', interpolatable, and legally non-unique — so
it cannot identify a declaration. The URL now carries action.name and the
server derives the handler key from what it resolved. An action with no name
is refused rather than falling back to target.
apiHandler and flowHandler are unchanged: their target genuinely is the
endpoint / flow id they dispatch on.
Requires the framework half, objectstack#3958 (merged).name, not target (ADR-0110 D1) (#2970)1 parent 0ded602 commit 1c07e6a
3 files changed
Lines changed: 80 additions & 6 deletions
File tree
- .changeset
- packages/app-shell/src/hooks
- __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 | + | |
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
285 | 324 | | |
286 | 325 | | |
287 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
499 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
500 | 509 | | |
501 | 510 | | |
502 | 511 | | |
| |||
523 | 532 | | |
524 | 533 | | |
525 | 534 | | |
526 | | - | |
| 535 | + | |
527 | 536 | | |
528 | 537 | | |
529 | 538 | | |
| |||
580 | 589 | | |
581 | 590 | | |
582 | 591 | | |
583 | | - | |
| 592 | + | |
584 | 593 | | |
585 | 594 | | |
586 | 595 | | |
| |||
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
594 | | - | |
| 603 | + | |
595 | 604 | | |
596 | 605 | | |
597 | 606 | | |
| |||
0 commit comments