Skip to content

feat(dashboard): edit each forge's access settings - #559

Merged
BryanFRD merged 3 commits into
mainfrom
feat/dashboard-forge-access
Oct 10, 2026
Merged

BryanFRD merged 3 commits into
mainfrom
feat/dashboard-forge-access

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Closes #558

The dashboard's access section now has a forge selector when LFSX_FORGES names any. Each forge's allow-list, restricted repositories and anonymous reads are saved, reset and refreshed on their own; a forge nobody changed keeps its environment.

  • API: /-/api/access?forge=<name> (GET, PUT, DELETE); without it, the main forge as before. An unknown name answers 404 and writes nothing.
  • Storage: a named forge's settings go to .lfsx/access-<name>.json beside access.json, and the 30 s refresh reads every forge's file, so all replicas follow.
  • access.rs resolves a Target (authorizer, environment, file) per request instead of hard-wiring the main forge.
  • Settings' forge table shows each named forge's live allow-list, not just its environment.
  • UI: flr-select above the form, "Main forge" plus each name; switching reloads that forge's settings. Checked on a local demo with a named forge.
  • Tests (tests/forge_access.rs): saving a named forge's access changes only that forge and writes only its file; reset brings back its environment; an unknown forge is 404 for GET, PUT and DELETE; a server starting with a saved forge file applies it.
  • Docs: docs/dashboard.md, docs/forges.md, docs/api.md.

Full server suite, clippy, typecheck and the dashboard build pass locally.

@BryanFRD
BryanFRD enabled auto-merge (squash) October 10, 2026 10:16

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server side looks right. Forge names are matched against the configured forges before they reach the file name, so there's no path injection. An unknown forge returns 404, and refresh covers every target. The tests cover save, reset, startup and an unknown forge.

One blocking issue, in the dashboard form: stale responses can load one forge's settings under another forge's selector (inline).

Nit: the new sentence in docs/dashboard.md is not wrapped to the file's line width.

CI was still running when I reviewed.

Comment thread app/src/app/pages/settings/access-form/access-form.ts Outdated

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8d21c3e fixes the stale-response finding. Reads now go through switchMap, the selector is disabled while a save or reset runs, and save/reset skip load() if the forge changed. The docs line is rewrapped. Nothing new in the changed code.

@BryanFRD
BryanFRD merged commit b975379 into main Oct 10, 2026
37 checks passed
@BryanFRD
BryanFRD deleted the feat/dashboard-forge-access branch October 10, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The dashboard can only change the main forge's access settings

1 participant