Removed gift links permission from the Author role#28910
Conversation
ref https://linear.app/ghost/issue/BER-3748/ - the fixtures granted Authors the "Manage gift links" permission, but Authors can't change post visibility, so they shouldn't be able to manage gift links either — the original grant was too broad - updated the fixtures and added a migration to drop the existing Author grant for sites that already ran the gift links permission migration
|
It looks like this PR contains a migration 👀 General requirements
Schema changes
Data changes
|
|
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 (2)
✅ Files skipped from review due to trivial changes (1)
WalkthroughAdds a migration helper export and a new migration that removes the Manage gift links permission from the Author role. The seeded Author permissions, migration integration expectations, fixture-manager count, and fixtures hash are updated to match, and the gift-links e2e tests now check 403 responses for Author and Contributor access without that permission. Possibly related PRs
Suggested reviewers
🚥 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)
Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 41s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 40s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 55s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 30s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 2s | View ↗ |
nx run-many -t lint -p ghost |
✅ Succeeded | 35s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 18s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 30s | View ↗ |
Additional runs (2) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-25 18:12:39 UTC
ref https://linear.app/ghost/issue/BER-3748/ - removing the Author gift links permission changed the fixtures, so the integrity hash and the permissions-roles relation count in the fixture tests needed updating to match

ref https://linear.app/ghost/issue/BER-3748/
The gift links permission fixtures were too broad: Authors were granted the "Manage gift links" permission, but Authors don't have permission to change post visibility — so they shouldn't be able to manage gift links either.
gift_link: managefrom the Author role in the permission fixturesremovePermissionFromRolemigration helper (the natural inverse ofaddPermissionToRole) so the migration can use itGift links are still behind the
giftLinkslabs flag, so this is not yet user-facing.