Commit 6b114a1
fix(approvals-inbox): align participant gating with the server-computed viewer block (#2719)
Consume framework#3310's per-viewer capability. `ApprovalRequestRow` gains an
optional `viewer: { can_act, is_submitter }`, and the inbox's participant checks
(the reply box + the "why disabled" hint) prefer it over the client-side
identity heuristic when present — so the hint never contradicts the declared
decision buttons (whose `visible` CEL now gates on `record.viewer.*`), and
position/team-addressed approvers the heuristic couldn't resolve are recognized.
The heuristic stays as a fallback for a backend that predates `viewer`.
Verified in-browser: a submitter viewing their own pending request no longer
sees approve/reject/reassign/send-back/request-info (all hidden), only remind
and recall; `getRequest` returns `viewer: {can_act:false, is_submitter:true}`.
Claude-Session: https://claude.ai/code/session_016ypkQikZ55oWUHUnMebwXA
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6f804b2 commit 6b114a1
3 files changed
Lines changed: 36 additions & 2 deletions
File tree
- .changeset
- apps/console/src
- pages/system
- services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
606 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
607 | 611 | | |
608 | 612 | | |
| 613 | + | |
609 | 614 | | |
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
613 | 618 | | |
614 | 619 | | |
| 620 | + | |
615 | 621 | | |
616 | 622 | | |
617 | 623 | | |
618 | 624 | | |
619 | 625 | | |
620 | 626 | | |
| 627 | + | |
621 | 628 | | |
622 | 629 | | |
623 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
0 commit comments