b0af358f Added post export permissions to the backup integration (#30138)
ref https://linear.app/ghost/issue/GVA-907/
- Ghost(Pro) archives are gaining a `post-analytics.csv` alongside the
existing `members.csv`, fetched from `GET
/ghost/api/admin/posts/export/` with the `ghost-backup` integration key,
and that endpoint is gated on `browse post`
- There is no explicit export posts permission, so we use browse posts -
exactly how `browse member` was added to this role in v5.121.0 to allow
the members export
- This grants no data the key could not already reach, in either half of
that CSV. Post content: `posts` is in the exporter's `TABLES_ALLOWLIST`,
so a plain `GET /db/` already returns every post's title, html and
lexical. The analytics counts: they derive from `emails`,
`email_recipients`, `members_click_events` and `members_feedback`, none
of which are in that allowlist - but `exportContent` accepts an
`include` option validated against `BACKUP_TABLES` (`db.js:45-56`),
which contains all of them, so `GET
/db/?include=emails,members_click_events` works with today's key
- So what the permission actually adds is a presentation: asking Ghost
to join those tables into a CSV, rather than dumping them and joining
them by hand
- It does open `/posts/` browse generally rather than only the export
route, since permissions are per action type rather than per endpoint
- Applied in fixtures and with a migration so both new and existing
sites get the update, and mirrored into the test fixtures
- Verified against a site created before this change, so fixtures never
re-ran and only the migration could have applied it: the role gains
`post|browse`, and the `ghost-backup` key then gets a 200 from
`/posts/export/?limit=all`. A Zapier key is still refused on `/db/` e56a2304 Restored CI `perf-tests` job for boot time benchmarking (#29769)
ref https://github.com/TryGhost/Ghost/pull/26512
ref https://app.incident.io/ghost/incidents/314
- `job_perf-tests` was removed in #26512 (`2026-02-19`) because
`TryGhost/Ghost-Benchmarks` had been archived, so the push step failed
on every main merge that touched core
- that repo was unarchived on `2026-07-19`, so the original blocker is
gone
- the measurement is a faithful restore: same hyperfine version
(1.18.0), same invocation, same jq transform, same destination, so the
existing 3,757-point series continues rather than restarting
- the surrounding plumbing had to change:
`./.github/actions/restore-cache` no longer exists (replaced by `pnpm
install`), `yarn` became `pnpm`, and all actions are now SHA-pinned per
org policy
- not added to `job_required_tests` - this charts a trend, it doesn't
gate merges (at the moment) e56a2304 Restored CI `perf-tests` job for boot time benchmarking (#29769)
ref https://github.com/TryGhost/Ghost/pull/26512
ref https://app.incident.io/ghost/incidents/314
- `job_perf-tests` was removed in #26512 (`2026-02-19`) because
`TryGhost/Ghost-Benchmarks` had been archived, so the push step failed
on every main merge that touched core
- that repo was unarchived on `2026-07-19`, so the original blocker is
gone
- the measurement is a faithful restore: same hyperfine version
(1.18.0), same invocation, same jq transform, same destination, so the
existing 3,757-point series continues rather than restarting
- the surrounding plumbing had to change:
`./.github/actions/restore-cache` no longer exists (replaced by `pnpm
install`), `yarn` became `pnpm`, and all actions are now SHA-pinned per
org policy
- not added to `job_required_tests` - this charts a trend, it doesn't
gate merges (at the moment)