Commit Graph

16413 Commits

Author SHA1 Message Date
Hannah Wolfe
03b0139ef9
Allow page to be used as post in dynamic routing
closes: https://github.com/TryGhost/Ghost/issues/10042
closes: https://github.com/TryGhost/Ghost/issues/14206

- the fact that pages are exposed as .page in dynamic routing has never played nicely
- this fix changes nothing in the tests - which shows this was never a covered case
- ideally I should add some tests, but for now this tiny change should prevent a lot of dynamic routing pain
- note, it doesn't remove .page, it just adds .post, so both work
2022-05-27 15:11:34 +01:00
Hannah Wolfe
17bb55118a
Removed completed TODO:
refs: 4fa412c880

- this was done in the referenced commit
2022-05-27 15:11:34 +01:00
Matt Hanley
96ca5252ba Added inviting user's email address as the reply-to address for staff invites
closes https://github.com/TryGhost/Team/issues/1501

- Staff invites previously came from the default site from-address, which is often a noreply
2022-05-27 13:05:29 +01:00
Hannah Wolfe
558f2b3d0d
🐛 Fixed gscan not detecting issues in folders
refs: https://forum.ghost.org/t/gscan-not-picking-up-some-products-incompatibilities-for-5-0/30394/4
closes: https://github.com/TryGhost/Team/issues/1653

- gscan wasn't running the new linter-based rules on anything in a folder
2022-05-27 12:52:09 +01:00
Renovate Bot
8ed2af7c3f
Update dependency knex to v2.1.0 2022-05-26 16:37:11 +00:00
Hannah Wolfe
8177e36242
Cleaned snap files (#14921)
- This PR was created by deleting all .snap files & running the tests
- The result is that all tests that have been removed or renamed have had their now-unused snaps deleted
2022-05-26 17:11:32 +01:00
Matt Hanley
2a84712d85 Merged v5.0.2 into main
v5.0.2
2022-05-26 15:24:09 +01:00
Daniel Lockyer
68b563e5be v5.0.2 2022-05-26 15:17:25 +01:00
Daniel Lockyer
f10f764861 Updated Admin to v5.0.2 2022-05-26 15:17:25 +01:00
Simon Backx
ad349bb3a5
Removed GA feature flags (#14915)
refs https://github.com/TryGhost/Team/issues/1616

- Removed all GA feature flags
- Removed `tweetGridCard` alpha flag
- Changes to `members-api` and `members-importer` packages: https://github.com/TryGhost/Members/compare/%40tryghost/members-api%408.1.1...%40tryghost/members-api%408.1.2
2022-05-26 09:54:30 +02:00
Naz
939496487d Removed subscriber-related webhook fixtures
refs https://github.com/TryGhost/Toolbox/issues/308
refs 0f5c22a38d

- There is no concept of "subscriber" in the codebase any longer. Keeping removed webhooks around does not make sense
2022-05-26 14:45:36 +08:00
Naz
2a0c1f9fb6 Removed outdated usecase from documentation
no issue

- There is no concept of single author in the codebase, so having it documented doesn't make sense
2022-05-26 10:59:29 +08:00
Naz
783cd1001a Fixed typo 2022-05-26 10:59:29 +08:00
Renovate Bot
0545c9d194 Update metascraper to v5.29.6 2022-05-25 18:47:00 +00:00
Matt Hanley
648e0894d8 Removed unused getNewsletterRelations method
refs https://github.com/TryGhost/Ghost/pull/14870
refs https://github.com/TryGhost/Members/pull/400

- Since the ref'd PRs, this method is no longer used
2022-05-25 16:51:43 +01:00
Daniel Lockyer
f7496880f0 v5.0.1 2022-05-24 18:21:41 +01:00
Daniel Lockyer
eddd3c36e2 Updated Admin to v5.0.1 2022-05-24 18:21:40 +01:00
Hannah Wolfe
a2cab6bdde
Update dependency gscan to v4.39.0 2022-05-24 17:39:47 +01:00
Matt Hanley
46307f8a03 Fixed typo in API version email notifications 2022-05-24 17:05:11 +01:00
Fabien 'egg' O'Carroll
4217e2571f
Included monthly_price,yearly_price&benefits defaults for Content API (#14912)
We have to update the output serializer to only clean includes for the
Admin API, so that these includes aren't stripped for not being in the
original include query param.

This also rejigs the other Content API only logic to sit together in
the input serializer.
2022-05-24 16:38:25 +01:00
Simon Backx
c052652559
Updated settings API to return all settings in edit endpoint (#14889)
refs https://github.com/TryGhost/Team/issues/1650

Since we introduced calculated settings, we need to return all settings when editing a setting, because those calculated settings can change.

- When editing settings, return all the settings. Previously we didn't include the calculated settings (which caused issues with admin not having up to date values for those)
- Updated Stripe <head> script to be injected based on the calculated settings

Required for https://github.com/TryGhost/Admin/pull/2405
2022-05-24 16:42:15 +02:00
Kevin Ansfield
c46303cb2b
🐛 Fixed email analytics crashing when processing unsubscribe/complaint events (#14883)
refs https://github.com/TryGhost/Team/issues/1649

The event handlers for `unsubscribed`/`complained` events originating from Mailgun were still using the now-deleted `member.subscribed` field resulting in errors and aborted attempts at processing the Mailgun event log.

- `member.subscribed` no longer exists, replaced that part of the query with a delete of member<->newsletter association rows from the `members_newsletters` pivot table
- kept the member `updated_at` bump so we have some timestamp record of an update
- added creation of `member_subscribe_event` records for the newsletter unsubscribes to keep stats and history in check
  - the unsubscribed/complained events do or at least should originate from a member action so "member" is more appropriate than "system" even though the event is being handled by an internal system
2022-05-24 12:38:42 +01:00
Hannah Wolfe
cdb365c29d Fixed minor weirdnesses with excerpts
- remove HRs ---- and blockquote > symbols from excerpts
- we want the excerpt to not contain "markdown-like" symbols, but just be plaintext
2022-05-24 12:35:59 +01:00
naz
6cc0c2b76b
🐛 Fixed signing key identificaiton in JWKs
refs https://github.com/TryGhost/Team/issues/1640

- The signing key returned by `GET /ghost/.well-known/jwks.json` was missing an OPTIONAL `use: "sig"` attribute needed to identify it as a signing key in client libraries. E.g. pyton lib: "pyjwt" or node lib: "jwks-client"
- More about the "use" attribute at RFC7515 - https://www.rfc-editor.org/rfc/rfc7515#section-4.1.4
2022-05-24 12:20:30 +01:00
Renovate Bot
ffb8b36fc8 Update dependency @playwright/test to v1.22.2 2022-05-24 08:37:44 +01:00
Renovate Bot
c590a9c29c Update dependency cssnano to v5.1.9 2022-05-24 08:37:35 +01:00
Naz
5569844019 🐛 Fixed page vs post preview template picking
refs 0c097f6532

- When viewed in "preview" context pages resolved to a "post" template instead. The bug was introduced with the referenced commit during post resource's `page` property migration
2022-05-24 15:33:47 +08:00
Naz
4fa412c880 🐛 Fixed page vs post context calculation
closes https://github.com/TryGhost/Ghost/issues/14886
refs 0c097f6532

- The context calculation after referenced change was adding a stray "post" entry into the context, causing the `{{#is "post"}}` helper to fail.
2022-05-24 15:33:47 +08:00
Daniel Lockyer
14828399e0
Reverted Ghost-CLI CI test to bumping minor version
- now we've released 5.0, we don't need to bump to the next major so we
  can just bump to the next minor
2022-05-24 09:20:57 +02:00
Naz
fcc9daf549 🐛 Fixed signing key mismatching in members JWT/JWKS
refs https://github.com/TryGhost/Team/issues/1640

- Some the clien libraries were not able to match the signin key to verify JWT when using `GET /members/.well-knonw/jwks.json` endpoint for member token verification. This issue was due to missing `keyid` parameter allows to indicate the key used to secure JWS (as per https://www.rfc-editor.org/rfc/rfc7515#section-4.1.4) and resolves the automatic matching issue on the client.
- The `kid` parameter was left in claims to avoid accidental breaking changes.
2022-05-24 11:45:20 +08:00
Naz
72479a152f Added basic e2e test for Members API .well-known endpoint
refs https://github.com/TryGhost/Team/issues/1640
refs https://github.com/TryGhost/Members/pull/401

- Adds basic test coverage for the `GET /members/.well-known/jwks.json` endpoint
- Next the test should be expanded with the JWT verification to check if the returned format is usable by mainstream client libraries
2022-05-24 10:27:46 +08:00
Daniel Lockyer
c001865e7c v5.0.0 2022-05-23 13:20:53 +01:00
Daniel Lockyer
3e140eb21b Updated Admin to v5.0.0 2022-05-23 13:20:52 +01:00
Daniel Lockyer
b4447adbf2 🎨 Updated Casper to v5.0.0 2022-05-23 13:20:51 +01:00
Peter Zimon
211239f645
Updated README
Updated Ghost screenshot
2022-05-23 13:06:35 +02:00
Renovate Bot
96956c5931
Update dependency eslint to v8.16.0 2022-05-20 23:47:22 +00:00
Hannah Wolfe
8dd009ffa0
🐛 Fixed member exports timing out for large sites (#14876) (#14878)
refs TryGhost/Team#1641

This commit adds a custom query for the members export, to improve the performance and to prevent any timeouts from happening when exporting large amounts of members.

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Matt Hanley <git@matthanley.co.uk>
2022-05-20 21:25:23 +01:00
Matt Hanley
eae0a6a3b9
Added products and Stripe data to exports and imports (#14873)
- The migration path from 4.x on SQLite to 5.0 on MySQL requires an export/import
- Exports don't include the Stripe info required to map members to tiers correctly on import. This change fixes that.

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-05-20 21:13:58 +01:00
Hannah Wolfe
d6d6841186
Added benefits, offers and snippets to exporter
- These are more things that we should write an importer for
2022-05-20 20:30:55 +01:00
Matt Hanley
3471f6cca0
Updated tests 2022-05-20 20:30:55 +01:00
Matt Hanley
f64577b4ce
Added products and Stripe data to exports
- we need to ensure we have this data when exporting so that we can import it later
2022-05-20 20:30:55 +01:00
Renovate Bot
e8a986c61b Update dependency gscan to v4.29.2 2022-05-20 13:16:47 +01:00
Renovate Bot
180be2c0ee Update dependency postcss to v8.4.14 2022-05-20 13:07:20 +01:00
Renovate Bot
70a1b7462c Update dependency jwks-rsa to v2.1.3 2022-05-20 13:07:08 +01:00
Simon Backx
419fa24f27
Fixed bulk unsubscribe counts (#14871)
refs https://ghost.slack.com/archives/C02G9E68C/p1652980792270029

- When bulk unsubscribing members, the number of deleted newsletter relations are returned instead of the number of members with newsletters that were cleared
- Updates members-api to 8.1.0, which uses this new option to delete newsletter relations by member_id instead of the id of the relation (which allows us to fetch the number of successfully/failed member deletes) Changes: https://github.com/TryGhost/Members/pull/400
- Added tests for bulk unsubscribe and bulk delete labels (because they both use the updated bulkDestroy method)
2022-05-20 13:40:55 +02:00
Simon Backx
b9e520c657
Added bulk destroy options (#14870)
refs https://ghost.slack.com/archives/C02G9E68C/p1652980792270029

- When bulk unsubscribing members, the number of deleted newsletter relations are returned instead of the number of members with newsletters that were cleared
- This commit adds options to the bulk destroy methods.
- You can pass the column on which you want to delete rows in a bulk destroy operation via the `column` option.

Required for https://github.com/TryGhost/Members/pull/400
2022-05-20 12:24:36 +02:00
Naz
fd8ce6a5bf Covered well-known endpoint with e2e test
refs https://github.com/TryGhost/Team/issues/1640

- There was no coverage. Now there is :)
2022-05-20 13:18:26 +08:00
Naz
a18469a3be Added root Ghost server/API test agent
refs https://github.com/TryGhost/Team/issues/1640

- Some tests require making request to the root of the mounted server path like `GET /ghost/.well-known/jwks.json`. These are not stricly APIs like Admin, Content, and Members. They do need a separate agent to distinguish the configuration - for this agetn we can stop loading some parts like "server" in the future to speed things up (didn't work straight out of the box)
2022-05-20 13:17:00 +08:00
Renovate Bot
5975740d69
Update dependency express-jwt to v7.7.2 2022-05-19 16:27:29 +00:00
Simon Backx
def8f83894
Fixed missing products in members export (#14867)
refs https://github.com/TryGhost/Team/issues/1642

- Updated `members-csv` (dependency via `members-importer`, shouldn't this be a separate dependency too?)  package to use the `tiers` field instead of the (removed) products field.
- Added basic test to see if products and labels are returned in the csv.
2022-05-19 18:26:29 +02:00