Skip to content

feat: scoped app access to notifications (PUT-1684) - #3688

Open
Salazareo wants to merge 1 commit into
DS/put-1681from
DS/put-1684
Open

feat: scoped app access to notifications (PUT-1684)#3688
Salazareo wants to merge 1 commit into
DS/put-1681from
DS/put-1684

Conversation

@Salazareo

Copy link
Copy Markdown
Member

An actor holding an app reads the app-user rows naming that app, plus its
developer rows when the holder owns it. account rows reach no app, and a
slice an actor may not see comes back empty rather than refused. The audience
predicate becomes the enforced read path in the same change that lifts the
blanket app-actor 403, layered behind an audience/app_uid SQL scope; two-segment
notif: subjects expand server-side from the actor's own app, so an app can
never name another app's uid.

No feature flag: audience defaults to 'account', so every pre-registry row is
default-denied to app actors and the backfill can only narrow.


Stacked on DS/put-1681 — review only this PR's diff; merges bottom-up.

An actor holding an app reads the `app-user` rows naming that app, plus its
`developer` rows when the holder owns it. `account` rows reach no app, and a
slice an actor may not see comes back empty rather than refused. The audience
predicate becomes the enforced read path in the same change that lifts the
blanket app-actor 403, layered behind an audience/app_uid SQL scope; two-segment
`notif:` subjects expand server-side from the actor's own app, so an app can
never name another app's uid.

No feature flag: `audience` defaults to 'account', so every pre-registry row is
default-denied to app actors and the backfill can only narrow.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 93.82%
⬆️ +0.06%
27321 / 29120
🔵 Statements 91.9%
⬇️ -0.10%
29627 / 32236
🔵 Functions 90.18%
⬆️ +0.17%
4937 / 5474
🔵 Branches 80.75%
⬆️ +0.09%
19608 / 24282
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/backend/drivers/notification/NotificationDriver.ts 95.45%
⬆️ +3.93%
91.66%
⬆️ +9.85%
100%
🟰 ±0%
96.29%
⬆️ +3.31%
180-181, 233-235, 343
src/backend/services/events/EventsService.ts 87.92% 81.85% 90.95% 93.36% 630-633, 754, 772-775, 801-804, 810, 816, 829-832, 850, 909, 928, 936, 1007, 1031, 1039, 1047, 1058, 1088, 1090, 1109-1110, 1125, 1161, 1163, 1168, 1189, 1191, 1213, 1291, 1295-1296, 1312, 1317, 1351, 1354, 1423, 1428, 1455, 1457, 1461, 1468, 1527-1530, 1532-1535, 1540-1543, 1578, 1598, 1618-1622, 1654-1658, 1689, 1704, 1716, 1735, 1747, 1749, 1760, 1772, 1791, 1804, 1839-1840, 1866, 1874, 1899, 1922, 1924, 1929, 1939, 1950, 1956, 2039, 2064, 2076-2080, 2098-2099, 2117, 2162-2164, 2199, 2245, 2313, 2334, 2357, 2387, 2390, 2391, 2396, 2421, 2454, 2457, 2459, 2486, 2492, 2629, 2685, 2754, 2763, 2774, 2780, 2823-2824, 2910, 2916, 2959, 2965, 3001-3005, 3027, 3035, 3043, 3053, 3129-3132, 3192, 3269, 3329-3333, 3392, 3403-3408, 3505, 3528, 3542, 3556, 3601, 3604, 3614, 3627, 3640-3641, 3669, 3702, 3711-3712, 3809, 3858-3860, 3871-3878, 3888-3889, 3899-3900
src/backend/services/notification/notificationAudience.ts 96.15% 96% 100% 95% 118
src/backend/stores/notification/NotificationStore.js 97.64%
⬇️ -2.36%
79.06%
⬇️ -1.58%
100%
⬆️ +7.70%
100%
🟰 ±0%
120, 230
Generated in workflow #943 for commit 4a52cb2 by the Vitest Coverage Report Action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant