Commit Graph

31729 Commits

Author SHA1 Message Date
Kevin Ansfield
2d2ac0102a Refactored signin controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- migrated to native class syntax and glimmer component patterns
- removed use of jQuery, the workaround to trigger change events no longer appears necessary
2022-11-01 14:12:23 +00:00
Daniel Lockyer
498bec08cf
Merged v5.22.2 into main
v5.22.2
2022-11-01 18:24:58 +07:00
Ghost CI
3c71d07dfb v5.22.2 2022-11-01 09:28:14 +00:00
Fabien 'egg' O'Carroll
a0ebb9a6f3
🐛 Fixed Tier description not being set (#15741)
closes https://github.com/TryGhost/Ghost/issues/15740

The validation function for a Tier description was not returning the
validated value, which meant we were unable to set the Tier
description.
2022-11-01 16:25:55 +07:00
Fabien "egg" O'Carroll
f761bd36b4
Fixed verification trigger usage of Event Repository
refs https://github.com/TryGhost/Team/issues/2192

The method signatures of the Event Repository have been updated to
take mongo filter objects, but this call-site was not updated.

Long term we should really be using NQL filter strings for our
filtering API and the mongo filter objects should be an implementation
detail, however we don't have time right now to rectify this.
2022-11-01 13:00:42 +07:00
Fabien "egg" O'Carroll
63fe013606 Fixed verification trigger usage of Event Repository
refs https://github.com/TryGhost/Team/issues/2192

The method signatures of the Event Repository have been updated to
take mongo filter objects, but this call-site was not updated.

Long term we should really be using NQL filter strings for our
filtering API and the mongo filter objects should be an implementation
detail, however we don't have time right now to rectify this.
2022-11-01 12:06:11 +07:00
Daniel Lockyer
68689917e6
Merged v5.22.1 into main
v5.22.1
2022-11-01 06:11:24 +07:00
Robin Cussol
e7e12aba09
Added e2e tests for page.published.edited webhook (#15724)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-31 19:51:04 +00:00
Halldor Thorhallsson
79c80f28cc
Removed bluebird from api-framework module (#15685)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Removing bluebird specific methods in favour of the Ghost sequence method so we can remove the bluebird dependency
2022-10-31 19:30:18 +00:00
Ghost CI
b2ad52fbf5 v5.22.1 2022-10-31 17:49:43 +00:00
renovate[bot]
8cde26f986 Update dependency ember-template-lint to v4.17.0 2022-10-31 17:37:40 +00:00
James Morris
8537239548 Moved the audience feedback setting into the footer
refs https://github.com/TryGhost/Team/issues/2191
2022-10-31 17:17:52 +00:00
Kevin Ansfield
b272b34a44 Fixed linter error 2022-10-31 12:12:58 +00:00
James Morris
21bf020e4e Moved the audience feedback setting into the footer
refs https://github.com/TryGhost/Team/issues/2191
2022-10-31 12:10:36 +00:00
Kevin Ansfield
5bf3fe9cb8 🐛 Fixed error preventing admin area being usable by staff users with Contributor role
closes https://github.com/TryGhost/Team/issues/2190

- added a guard around the tier fetches in `membersUtils` service so the fetch doesn't occur unless we have a logged in user and they aren't a contributor
- extracted the `withPermissionsCheck` mirage util function and added role checks around the mocked tiers endpoints
- added an acceptance test that loads the content screen and creates a draft post as a contributor to help catch regressions
2022-10-31 12:01:39 +00:00
Daniel Lockyer
92740e8967
Merged v5.22.0 into main
v5.22.0
2022-10-31 17:49:27 +07:00
Ghost CI
44722efe38 v5.22.0 2022-10-31 10:41:31 +00:00
Fabien "egg" O'Carroll
f878e84707 Fixed Tiers importer not correctly mapping price data
refs https://github.com/TryGhost/Toolbox/issues/464

Bceause the import does not use the API, any backwards compat code we put in the
API does not get run for imports, this means we need to update the importer to
map the stripe_prices data onto the products table so that we have valid data in
the database.
2022-10-31 17:30:16 +07:00
Daniel Lockyer
d59909941c Backfilled missing columns in products table
refs https://github.com/TryGhost/Toolbox/issues/464

- due to a bug with the content importer, importing a JSON file where
  the `products` do not contain price info will store null values in the
  table instead of the defaults
- this ends up causing further issues because we're not populating the
  table for paid products
- this commit is a copy of the 5.19 migration
  `2022-09-02-20-52-backfill-new-product-columns.js`, but adds a check
  for a null `t.currency`, which combined with the `t.type === paid`,
  should identify the rows we want to update
2022-10-31 16:36:57 +07:00
Naz
49e97829d0
Added auto-mapping for complimentary_plan column
closes https://github.com/TryGhost/Team/issues/1076
refs f068e40723
refs 7fe9e06c4d

- The Members CSV importer was not auto-detecting and mapping the `complimentary_plan` column when it was present in CSV. This was to improve user-experience and NOT start the import as a "background job" by default.
- With resent (see refs) changes having "complimentary_plan" column in the imported file does not send the import into the background. We can now safely include it as auto-detected field, without compromising user experience.
2022-10-31 16:47:14 +08:00
Naz
7fe9e06c4d
Fixed rule for import background job detection
refs https://github.com/TryGhost/Team/issues/1076

- The members CSV import would go into background job (longer running and resulting with an email) when it contained a complimentary_plan column.
- With recent members codebase decoupling Ghost does not make any connection to Stripe as "complimentary plan" data is saved purely in native data structures. Making no need for a background job for complimentary plans
2022-10-31 16:31:55 +08:00
Naz
4d26c50e0b
Fixed data type of hasStripeData in member importer
refs https://github.com/TryGhost/Team/issues/1076

- What appeared to be a "boolean" by nature and name, the hasStripeData was holding a result of "find" method - and object or an undefined value
- Fixed the typing, to avoid ambiguity in the future
2022-10-31 16:31:35 +08:00
renovate[bot]
ac01fc5e42 Update dependency @babel/plugin-proposal-decorators to v7.20.0 2022-10-31 10:38:05 +07:00
renovate[bot]
5d49ce269a Update dependency cssnano to v5.1.14 2022-10-31 09:50:23 +07:00
Hannah Wolfe
25d5839e96
Added shouldCompileToError test util
refs: a8b1676734

- Extended the newly created handlebars test utils with a shouldCompileToError method
- Updated the price helper tests tp use shouldCompileToExpected and shouldCompileToError
- This allows us to test our handlebars helpers in a much more conisstent way
2022-10-30 16:55:53 +00:00
Barno
a24eb06179
Replaced Promise.map() with .all() in importer (#15616)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Removing bluebird specific methods in favour of the Ghost sequence method so we can remove the bluebird dependency

Co-authored-by: Carol-Barno <cbarno@innovexsolutions.co.ke>
2022-10-30 16:51:29 +00:00
leonyangela
7df2b7625f
Added e2e tests for page.tag.attached webhook (#15648)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-30 16:45:51 +00:00
Barno
3f0713fbc4
Replaced Promise.each() with .all() in models/relations/author (#15614)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Removing bluebird specific methods in favour of the Ghost sequence method so we can remove the bluebird dependency

Co-authored-by: Carol-Barno <cbarno@innovexsolutions.co.ke>
2022-10-30 16:06:01 +00:00
Hannah Wolfe
a8b1676734
Refactored shouldCompileToExpected into shared util
no issue

- There are currently two patterns in our handlebars helper unit tests:
  1. Treating the helper as a function, and doing a function call
   - This is the original way the tests were done, and they're not great as they're approximating how the helpers are really used
  2. Using a template string, and rendering the string using a method called shouldCompileToExpected
   - These tests are more realistic and powerful and also easier to read

- The new method is only being used in a few places so far, and each place had re-created the `shouldCompileToExpected` method
- Therefore I've moved this method into a util that should make it easier to write unit tests for handlebars helpers
- I also renamed the method in the excerpt tests, because it doesn't do the same thing, it's just a wrapper around a function call rather than compiling a string

The aim is to refactor all of our handlebars helper tests to use `shouldCompileToExpected`
2022-10-30 15:26:29 +00:00
Halldor Thorhallsson
5a94cc8039
Removed bluebird from misc packages (#15676)
refs: https://github.com/TryGhost/Ghost/issues/14882

- Removed bluebird from members-csv package-json and update-check-service 
- Removing bluebird specific methods in favour of the Ghost sequence method so we can remove the bluebird dependency
2022-10-30 15:16:10 +00:00
Vedant Bhamare
3f289edc26
Added e2e tests for page.tag.detached webhook (#15651)
refs: https://github.com/TryGhost/Ghost/issues/15537

- snapshot test created to add confidence to webhook stability and increase overall test coverage.
2022-10-30 14:59:12 +00:00
Hannah Wolfe
5fe6687c2a
Skipped slow activity feed tests temporarily
- These tests are very slow, and make the build fail about 2/3 times
- Temporarily skipping until we can fix, as I want to get all our outstanding hacktoberfest PRs merged
2022-10-30 14:52:30 +00:00
Hannah Wolfe
3ec0057567
Removed accidentally committed file
- This was accidentally included in a fixup commit
2022-10-30 14:38:59 +00:00
Arjuna Kristophe Sankar
096dffb817
🐛 Fixed missing active theme breaks design screen (#15602)
closes: https://github.com/TryGhost/Ghost/issues/15505

When starting Ghost with a missing active theme, the design settings screen and change theme screen both end up in a broken state with the user unable to select a new theme as the active one.

The design screen has no default (or blank) slate, and so shows a preview of an empty theme.
- First added a new default screen to serve as a placeholder for when the state contains no active theme.
- Added a check for when there was no active theme, then redirects the user to the default screen .

The change theme screen wants to set an active property on the theme that should be active in the theme list.
- Added a check to see whether there is an active theme set.
- If there isn't one, don't bother trying to add the active property.
2022-10-30 14:14:11 +00:00
Ghost CI
7724d29afd v5.21.0 2022-10-28 16:00:39 +01:00
Fabien "egg" O'Carroll
68d887202a Released Portal v2.19.3 2022-10-28 18:39:04 +07:00
Fabien 'egg' O'Carroll
0396f59fec
Fixed error showing on Stripe Checkout (#15719)
`window.location.assign` does not return anything, so `result.error` was
failing because `result` was undefined. We've moved the handling of the
result of `redirectToCheckout` to be specific to that promise. We've
also removed the use of `catch` because all it did was rethrow the
error, which is default behaviour.
2022-10-28 16:48:22 +07:00
Rishabh
5a029620fd Updated new analytics page with audience feedback
refs b027ed6378

- analytics page was split between old and new behind the audience feedback flag
- the new page had missing method as we switched the page to new one once the flag was switched on
2022-10-28 12:01:11 +05:30
renovate[bot]
61ff499037
Update dependency sanitize-html to v2.7.3 2022-10-27 22:42:54 +00:00
Rishabh Garg
83d89ef077
Updated cache invalidation handling on link edit (#15718)
refs https://github.com/TryGhost/Team/issues/2158

- the cache invalidation header returned should be specific to the email links pattern, otherwise it blows entire cache on every link edit
2022-10-28 02:48:42 +05:30
Rishabh Garg
d10d4390f0
Removed duplicate newsletter tracking settings (#15717)
refs cca0f7d7dc

- newsletter tracking setting has now moved to analytics settings page. the duplicate settings on newsletter settings page is removed.
2022-10-28 02:35:39 +05:30
Rishabh Garg
007637973e
🐛 Fixed comped member creation via Admin API (#15714)
closes https://github.com/TryGhost/Team/issues/2184

- when using the old legacy method of `comped:true` to add complimentary subs to a member along with a label, the API call failed with `Internal Server error` and the member was added as free on the site.
- patches the options sent for fetching default product to only pick the relevant keys, as it was picking up the `withRelated` for `labels` that caused the API failure
2022-10-28 01:59:05 +05:30
e.baidakova
d8fa21e43c Revert "Update portal version"
This reverts commit b5b7ce5f7a.
2022-10-27 23:36:58 +04:00
e.baidakova
b5b7ce5f7a Update portal version 2022-10-27 23:31:48 +04:00
e.baidakova
657fe565f5 Released Portal v2.19.2 2022-10-27 23:29:19 +04:00
e.baidakova
3e97e47c39 Fix unauth error 2022-10-27 23:28:18 +04:00
Simon Backx
2e517b6744 Fixed membersTrackSources not hiding attribution analytics 2022-10-27 20:35:34 +02:00
Simon Backx
8bf8134500 Removed GA flags from labs page 2022-10-27 19:16:31 +02:00
Simon Backx
250da0abf7 Removed fallback to clicked count for opened count
fixes https://github.com/TryGhost/Team/issues/2189

We don't want this fallback because the table on the analytics page will be empty while the count be higher than zero
2022-10-27 18:40:13 +02:00
Simon Backx
66e282f7e3 Fixed default setting count regression test 2022-10-27 18:37:45 +02:00