Repository navigation
Gift links: Admin Integration access - #28669
Conversation
ref https://linear.app/ghost/issue/BER-3739/admin-integration-access-to-gift-links - fast-follow to the merged gift-links data foundation (#28626), addressing Kevin's review question about programmatic access/management - grants Admin Integration the same per-post `manage` permission Editors and Authors already have, so gift links can be created/reset over the Admin API; the endpoint's own edit.post ownership check still applies (integrations hold post:all, so they pass it) - the site-wide `resetAll` kill switch stays Administrator-only — a leaked integration key should not be able to nuke every active gift link at once - migration lands in the same 6.46 cycle as the foundation; fixtures + integrity hash + permission-count tests updated to match
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughA new database migration grants the "Admin Integration" role the "Manage gift links" permission via Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration:no-coverage |
✅ Succeeded | 1m 56s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 1m 10s | View ↗ |
nx run ghost:test:ci:e2e:no-coverage |
✅ Succeeded | 4m 2s | View ↗ |
nx run ghost:test:ci:e2e |
✅ Succeeded | 3m 54s | View ↗ |
nx run ghost:test:ci:legacy |
✅ Succeeded | 2m 20s | View ↗ |
nx build @tryghost/sodo-search |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/announcement-bar |
✅ Succeeded | <1s | View ↗ |
nx build @tryghost/comments-ui |
✅ Succeeded | <1s | View ↗ |
Additional runs (10) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-17 06:55:14 UTC

Fast-follow to the merged gift-links data foundation (#28626), addressing Kevin's review question:
ref https://linear.app/ghost/issue/BER-3739/admin-integration-access-to-gift-links
What
Grants the Admin Integration role the existing
Manage gift links(gift_link: manage) permission, so gift links can be created / ensured / reset programmatically over the Admin API.Why this scope
manageonly, notall. Mirrors Editor / Author / Super Editor. The endpoint's ownedit.postownership check still applies — Admin Integrations holdpost: all, so they pass it for any post.resetAllstays Administrator-only. A leaked integration key should not be able to deactivate every active gift link site-wide in one call.giftLinkslabs flag, so this is inert until the rest of the stack lands and the flag is enabled.Changes
6.46migration linkingManage gift links→Admin Integration(down removes it)gift_link: manageadded to Admin Integration in bothfixtures.jsonfiles (fresh installs)migration.test.js,fixture-manager.test.js(147 → 148), and the integrity fixtures hashMigration + fixture + integrity tests pass locally.