Public: anyone can read this; the crew can change it.

Holding a file from any page goes through one form handler that takes where to return, and refuses an unknown or unreadable repository in the same words #7055

shipped production is serving it opened this has it
opened this

First of three pieces split from #6846. Pull #7004 copied fileHoldUpdate (src/web/pages/file_holds.ts) for its /boards route, and its refusal for a missing repository differed from the one a private repository gets, which told a stranger the repository exists.

Done:

  • [ ] fileHoldUpdate's body becomes one exported function that takes the form, the repository and to (where to return). The repository settings route calls it with its own to, and behaves exactly as today.
  • [ ] A missing repository and a private one the caller cannot read both answer "That file could not be held.", with the same status.
  • [ ] A new test posts hold and release through the settings route, then asserts a missing repository and an unreadable private one give byte-identical answers.

Files: src/web/pages/file_holds.ts, test/file-hold-form.test.ts

If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the tests this names.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs