Merge claude/security-c-1172: form submissions over REST only for staff, the job queue for an admin or Bearer CRON_SECRET, doctor visitor-writes
Conflicts with security-a-1172 kept both sides: imports (adminSameOrigin, jobsAccess), the doctor status (originKnown and visitorWrites), its test, and the e2e:built line (A's sign-in answers spec with C's CRON_SECRET). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+2
-2
@@ -559,7 +559,7 @@ then does it store. A flood dies before it touches the network or the database.
|
||||
|
||||
**REST is closed.** By default the form-builder lets anyone create submissions through
|
||||
`POST /api/form-submissions` — skipping all the gates below. IAPL
|
||||
sets `access.create` of the `form-submissions` collection to "logged-in users only"; the front end
|
||||
sets `access.create` of the `form-submissions` collection to "a staff account with its second factor" (since 1.17.2; before: any signed-in account, a customer of a visitor login collection included); the front end
|
||||
submits through `submitForm` (server action → Local API), so this does not affect it.
|
||||
A deliberately public REST (e.g. an external app) →
|
||||
`forms: { formSubmissionOverrides: { access: { create: () => true } } }` — then
|
||||
@@ -873,7 +873,7 @@ filter it out on the client.
|
||||
- **Turn off:** without the `forms` option the plugin does not wire the form-builder (no Forms / Form Submissions collections).
|
||||
Single field types: `forms.fields.<type>: false`. Files: `forms.attachments` is off unless you set it ("Files").
|
||||
- **Override the collections:** `formOverrides` / `formSubmissionOverrides` — fields (the `fields` function), `labels`,
|
||||
`admin`, `access`, `hooks`. The default submissions access (`create`: logged-in users, `read`: editor+, `delete`: admin)
|
||||
`admin`, `access`, `hooks`. The default submissions access (`create`: a staff account with its second factor since 1.17.2, `read`: editor+, `delete`: admin)
|
||||
is overridden by keys in `formSubmissionOverrides.access`; forms access (`create`/`update`/`delete`:
|
||||
editor+, `read`: public) — in `formOverrides.access`. The Emails tab protection (`read`: editor+) is
|
||||
applied to the default fields **before** `formOverrides.fields`, so you change it there.
|
||||
|
||||
Reference in New Issue
Block a user