Commit ccc265e
Mirror Reader Product_Member rows into authorized_users in tests
Tests for `test_product_endpoint_report_scoping` and
`test_location_finding_reference_authz` set up authorization via
``Product_Member`` rows, but legacy authorization queries
(`get_authorized_*`) check the ``Product.authorized_users`` M2M directly
— ``Product_Member`` rows are inert at runtime. Reader-role rows are
also skipped by ``LegacyAuthMirrorMixin`` (which mirrors non-Reader
roles only, to preserve deny-path test coverage). The tests need the
restricted users to actually have access, so mirror their RBAC rows
into ``authorized_users`` explicitly.
Also rename ``test_finding_reset_duplicate_reader`` ->
``..._reader_denied`` so it matches the ``_reader_`` suffix the
``TestRelatedObjectPermissions.setUp`` skip check looks for — the
prior name slipped past the skip and asserted a 403 that legacy auth
returns as a 404.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9971c19 commit ccc265e
3 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | | - | |
| 1648 | + | |
1649 | 1649 | | |
1650 | 1650 | | |
1651 | 1651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
0 commit comments