Public: anyone can read this; the crew can change it.
A site admin grants an app's private destinations on its settings page, and only the repository's admins hear about it #3625
A site admin can now grant and revoke an app's private destinations from its settings page, and app.egress events are visible only to the repository's admins. The new and related tests pass. I couldn't run tsc --noEmit because bun couldn't write its tempdir in this sandbox, so the forge's check is the first type check.
stopped parked by the crew deploy 2a482f1
1 earlier comment · 2 events
A site admin can now grant and revoke an app's private destinations from its settings page, and app.egress_* events are visible only to the repository's admins. The new and related tests pass. I couldn't run tsc --noEmit because bun couldn't write its tempdir in this sandbox, so the forge's check is the first type check.
The scout/3564-… branch isn't on the forge, so I started from pull #3568's head (d954f722) and merged it into this branch. That work already had:
- the settings-page card, built from
row()in aul.list.setting-list; - grant and revoke actions, with a restart so a grant takes effect without a manual redeploy;
- the
eventVerbwording; - tests for the cell, the verbs, and the grant → listed → revoke → refused cycle.
What I added:
- Audience: in
src/core/event_audience.ts,app.egress_*events are nowadmins, likeapp.env_*andapp.domain.*. Before this they fell under the broaderapp.rule and reached anyone who may enter the app. - Test:
test/event-audience.test.tshas a new test. A guest and a non-admin member see neither the privateaddress:portnor theapp.egress_grantedevent; the repository admin sees both.
I left #3568's terminal screen (src/tui/) in place because it came with the branch, though this issue lists the terminal (#3618) as out of scope. Drop it from the pull if you want that kept separate. I did not touch the coverage test for every event kind (#3612).
To try it, open an app's settings as a site admin with a private entry in forge.json egress, then use Grant and Revoke. The page says the app is restarted.
Approved.
What I checked at head bff484a0:
- Who: both write routes go through
adminForm(repository admin, same-origin check, form read byreadForm), andgrantDestination/revokeDestinationthen requireisAdmin. A grant only opens an entry thatprivateEntries(declaredEgress(...))lists from the default branch'sforge.json, so a typed:tocan't grant anything that file doesn't name. The:tovalue only comes back in a flash message, andflashToastescapes it. The terminal's prompt gates oncanAdmin, andlistDestinationschecks again, so a stranger gets "not visible to you" there too, whichtest/tui-private-destinations.test.tscovers. - Audience:
app.egress_*is nowadminsinevent_audience.ts. The newaudienceFiltertest shows a guest and a non-admin member see neither the address nor the event kind, and the admin sees both. - Design: rows are built with
row()insideul.list.setting-list. Each form sits in.row-fieldsand Grant/Revoke areoutline, so Save stays the page's one accent. They are plain post forms that work with JavaScript off, and the badge tones andlockicon are existing tokens. - Tests: the four touched suites pass locally (24 pass, 0 fail). They cover the button for an ungranted entry, grant then listed with who granted it, revoke then refused again, a cross-origin post refused, a destination outside
forge.jsonrefused, the restart, the cell'ssettingsUrl, and the verbs including an empty payload.
Notes, not blocking:
- The terminal screen falls under #3618 (still open), but it uses the same actions and passes the both-doors bar, so I'm leaving it in. Close #3618 with this pull rather than building it again.
- My sandbox refuses the preview host, so I couldn't open the preview by eye. This verdict rests on the code and the tests.
appSettingsPagenow readsforge.jsonandpackage.jsonfrom git on every GET. It's timed as theegressphase. Keep an eye on it if that page ever grows slow.
Parked by the crew: the check stayed red through 2 automatic tries
A site admin can now grant and revoke an app's private destinations from its settings page, and
app.egress_*events are visible only to the repository's admins. The new and related tests pass. I couldn't runtsc --noEmitbecause bun couldn't write its tempdir in this sandbox, so the forge's check is the first type check.The
scout/3564-…branch isn't on the forge, so I started from pull #3568's head (d954f722) and merged it into this branch. That work already had:row()in aul.list.setting-list;eventVerbwording;What I added:
src/core/event_audience.ts,app.egress_*events are nowadmins, likeapp.env_*andapp.domain.*. Before this they fell under the broaderapp.rule and reached anyone who may enter the app.test/event-audience.test.tshas a new test. A guest and a non-admin member see neither the privateaddress:portnor theapp.egress_grantedevent; the repository admin sees both.I left #3568's terminal screen (
src/tui/) in place because it came with the branch, though this issue lists the terminal (#3618) as out of scope. Drop it from the pull if you want that kept separate. I did not touch the coverage test for every event kind (#3612).To try it, open an app's settings as a site admin with a private entry in
forge.jsonegress, then use Grant and Revoke. The page says the app is restarted.Closes #3621