Commit ea03c7c
* test(plugin-approvals): pin the business-unit MEMBER org screen (#14946) — red against the unmodified service
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
* fix(plugin-approvals): screen expanded business-unit members to the directory organization (#14946)
`expandBusinessUnitUsers` screened the unit rows with the null-inclusive
`businessUnitOrgScope` (#3807) but read `sys_business_unit_member` with no
organization predicate, under SYSTEM_CTX which carries no tenant. A seeded
unit id exists in every tenant, so tenant A's department approver resolved
tenant B's members. The member read now carries a strict organization_id
equality (`businessUnitMemberScope`): the column is injected and only the
session write path fills it, so NULL means unknown tenancy, not global.
Existing fixtures that pinned org-less membership rows on stamped or seeded
units are re-anchored onto stamped rows; the org-less case is pinned on its
own (B3) as the declared, loud cost.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
* test(plugin-approvals): judge the #14946 fake engine's find bound by presence; re-anchor the system-context page; ledger the new pin file
- the fake engine's `find` no longer reads `this` (the objectql-double-limit
probe calls it unbound) and applies the caller's bound after the filter, by
presence, instead of a default page of 1000
- content/docs/permissions/system-context.mdx: six approval-service.ts line
anchors re-aimed by +57, the net insertion of the businessUnitMemberScope
docblock above them (check-system-context-census --fix)
- engine-double-contract ledger learns business-unit-member-org-screen.test.ts
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARYe3yQTQCUFm5qPYNgKaJ
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent cee3961 commit ea03c7c
6 files changed
Lines changed: 365 additions & 12 deletions
File tree
- .changeset
- content/docs/permissions
- packages/plugins/plugin-approvals/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
| 433 | + | |
432 | 434 | | |
433 | | - | |
434 | | - | |
435 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
436 | 438 | | |
437 | 439 | | |
438 | 440 | | |
| |||
913 | 915 | | |
914 | 916 | | |
915 | 917 | | |
916 | | - | |
917 | | - | |
| 918 | + | |
| 919 | + | |
918 | 920 | | |
919 | 921 | | |
920 | 922 | | |
| |||
944 | 946 | | |
945 | 947 | | |
946 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
947 | 953 | | |
948 | | - | |
949 | | - | |
| 954 | + | |
| 955 | + | |
950 | 956 | | |
951 | 957 | | |
952 | 958 | | |
| |||
973 | 979 | | |
974 | 980 | | |
975 | 981 | | |
976 | | - | |
977 | | - | |
| 982 | + | |
| 983 | + | |
978 | 984 | | |
979 | 985 | | |
980 | 986 | | |
| |||
Lines changed: 59 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1734 | 1734 | | |
1735 | 1735 | | |
1736 | 1736 | | |
1737 | | - | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
1738 | 1791 | | |
1739 | 1792 | | |
1740 | 1793 | | |
| |||
1769 | 1822 | | |
1770 | 1823 | | |
1771 | 1824 | | |
1772 | | - | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
1773 | 1830 | | |
1774 | 1831 | | |
1775 | 1832 | | |
| |||
0 commit comments