Commit Graph

29317 Commits

Author SHA1 Message Date
Daniel Lockyer
c4df99f8a6
Fixed pages unable to be filtered
- this was due to a typo - it should be singular
2022-08-22 19:33:54 +02:00
Daniel Lockyer
6697dcb39a
Allowed Users to be filtered in Audit Log
refs https://github.com/TryGhost/Toolbox/issues/356

- this was missed from the first implementation
2022-08-22 19:31:55 +02:00
Peter Zimon
ef1d7593f5 Updated copy for Audit log table header
refs. https://github.com/TryGhost/Toolbox/issues/356

- there was an inconsistency between the table header and the rest of the UI
2022-08-22 19:18:55 +02:00
Peter Zimon
122ba10114 Updated Activity log list design
refs. https://github.com/TryGhost/Toolbox/issues/356

- The Audit log list had a temporary (POC) design, it needed refinements
2022-08-22 19:15:37 +02:00
James Morris
18186f9ba6 Added in the attribution column for activity page
refs https://github.com/TryGhost/Team/issues/1816
2022-08-22 17:51:01 +01:00
Peter Zimon
3b13c03af2 Fixed Admin lint error 2022-08-22 18:40:49 +02:00
Peter Zimon
b3d2f2ef1f Updated UX for accessing Audit log
refs. https://github.com/TryGhost/Toolbox/issues/356

- The entry for Audit log had been temporarily put on the top level Settings screen. Instead it's now accessible from Settings / General from a generic About box which had been moved from the What's new page. This also required to update the layout of the What's new page a little bit.
2022-08-22 17:56:40 +02:00
Daniel Lockyer
3831d8d479
Fixed pagination in audit log table
- the `created_at` key is stored directly under the object we fetch as
  the last event, rather than a subkey
- this meant we weren't checking the date of the last event correctly,
  which broke pagination
2022-08-22 17:51:34 +02:00
James Morris
e3e613de1c Fixed a linting problem
refs https://github.com/TryGhost/Team/issues/1816
2022-08-22 16:51:03 +01:00
James Morris
3e57f88d12 Added in the attribution column to the dashboard activity under feature flag
- This has the attribution column back into the dashboard activity
- This works only under the member attribution flag
- There are still some issues with event copy

refs https://github.com/TryGhost/Team/issues/1816
2022-08-22 16:28:18 +01:00
Simon Backx
fe3430202a
Fixed member attribution for subdirectories (#15277)
fixes https://github.com/TryGhost/Team/issues/1829

- Remove the subdirectories when creating the Attribution instances
- URLs are now always stored relative to the subdirectory instead of the root directory (makes changing the subdirectory easier)
- Fixed returning absolute urls
- Added tests
2022-08-22 17:16:18 +02:00
Daniel Lockyer
adaecde430
Split event and resource filtering apart
refs https://github.com/TryGhost/Toolbox/issues/356

- events and resources needed to be filtered and sent to the API
  differently
- this commit splits them apart and wires up the toggles to query params
  and therefore API requests
2022-08-22 17:14:34 +02:00
Daniel Lockyer
71e541f2c4
Cleaned up code duplication in Audit Log table
refs b9a42bcb1c (r81841869)

- this makes it clearer to read and cleans up my messy hacks
2022-08-22 16:12:46 +02:00
Daniel Lockyer
30d211fcab
Restricted linking to posts and pages
refs https://github.com/TryGhost/Toolbox/issues/356

- linking is a bit hit-or-miss right now so it's best to only link to
  the resources we can
- this implements a `linkable` attribute on an event to indicate if we
  can link to its page or not
2022-08-22 16:09:56 +02:00
Daniel Lockyer
b9a42bcb1c
Added note when an object is unknown
refs https://github.com/TryGhost/Toolbox/issues/356

- this can occur when the ID in the action event is unknown in the DB,
  and we don't have any other context for it
2022-08-22 15:49:20 +02:00
Daniel Lockyer
68030d4d52
Added basic filtering and searching to audit log
refs https://github.com/TryGhost/Toolbox/issues/356

- this adds some basic filtering and search across the audit log events
- not all of it works, but filtering by objects and searching for users
  should work
2022-08-22 15:41:04 +02:00
Daniel Lockyer
66438ff4ed
Fixed capitalization of API key
- using the resource type verbatim wasn't going to work with `api_key`
  because it needs splitting and capitalizing
2022-08-22 15:41:04 +02:00
Daniel Lockyer
60b8cb1a30 Updated CI runners to Ubuntu 22.04
refs https://github.com/actions/runner-images/issues/6002

- Ubuntu 18.04 is now deprecated in GHA
- this commit moves all tests onto 22.04 except the Admin integration
  tests because they're failing to pick Firefox up
- I can look into this after we've unblocked CI
2022-08-22 15:37:19 +02:00
James Morris
8b8fa76cc7 Made all the event tables more consistent
- Adjustments to the icon spacing for all tables
- Adjustments to the font weighting and colour for all event tables
- Changed activity on dashboard to have relative time
- Tweaked padding and margins to bring more consistency
- Also fixed a linting bug

refs https://github.com/TryGhost/Team/issues/1816
2022-08-22 13:32:36 +01:00
James Morris
5008a5b948 Added full width to pages and posts with member attribution columns
refs https://github.com/TryGhost/Team/issues/1818
2022-08-22 12:03:53 +01:00
Daniel Lockyer
efc10b501e
Re-enabled Ghost-CLI tests in CI
- this required some reworking for the new monorepo setup, but this
  commit should now enable the Ghost-CLI tests in CI again
- also switched upgrade test to v4 to support Node 16
2022-08-22 11:40:13 +02:00
Simon Backx
02168b41ce Improved dependency structure of member-attribution package
refs https://github.com/TryGhost/Ghost/pull/15266#discussion_r950337271

- Moved dependency building to the the service wrapper
- Don't listen for events inside the constructor
- Used a models option to pass around models to make constructors more readable
2022-08-22 11:36:24 +02:00
Simon Backx
0943daad72
Added member attribution to member details page (#15266)
refs https://github.com/TryGhost/Team/issues/1817

Co-authored-by: James Morris <moreofmorris@users.noreply.github.com>
2022-08-19 16:39:18 -04:00
Daniel Lockyer
46870c423f
Merged v5.10.1 into main
v5.10.1
2022-08-19 18:57:59 +02:00
Daniel Lockyer
6ade771a9f v5.10.1 2022-08-19 17:50:40 +01:00
Rishabh
61b4651901 Fixed display of free trial pill on Portal
refs https://github.com/TryGhost/Team/issues/1728
2022-08-19 22:02:12 +05:30
Rishabh
a072d5d0a8 Handled upgrade and expiry of comped subs in Portal
refs https://github.com/TryGhost/Team/issues/1727
refs https://github.com/TryGhost/Team/issues/1728

- allows comped members to upgrade(behind flag)
- shows expiry for comped subs
2022-08-19 21:05:33 +05:30
Rishabh
c19d2d8712 Updated subscription flow to only attach single tier to member
refs https://github.com/TryGhost/Team/issues/1728

- previously, we allowed a member to be mapped to multiple tiers simultaneously as an edge case, in case they managed to signup via another subscription
- since this was always an edge case and not supported, to simplify the flows going forward now that complimentary members can also upgrade, in case of an active subscription we'll always just attach the associated tier to member and remove all other tiers mapped to it
2022-08-19 20:55:31 +05:30
Rishabh
6f2066517b Allowed comped members to go through checkout flow
refs https://github.com/TryGhost/Team/issues/1728

- allows comped members to go through the stripe checkout flow and become a paid member
2022-08-19 20:55:31 +05:30
Daniel Lockyer
b023f716ab
Fixed content-length header in Explore snapshot
- this endpoint returns the Ghost version, of which the minor just hit
  double digits
- because of this, the content-length size changed, and the snapshot was
  incorrect
- we've previously allowed overrides for the content-length to be any number (see
  1fadbacdec)
- this commit allows the header to be any number so it doesn't fail when
  the Ghost version is incremented
2022-08-19 17:14:04 +02:00
Daniel Lockyer
0df8ee8c72 v5.10.0 2022-08-19 16:02:37 +01:00
Hannah Wolfe
809c1a6e08 🐛 Fixed error deleting post with comment replies
closes: https://github.com/TryGhost/Ghost/issues/15252

- comments are deleted when posts are deleted. Without cascade delete on parent_id, replies cannot be deleted
- this change means that deleting a post will delete all comments and replies without error
2022-08-19 15:49:58 +01:00
Sanne de Vries
6fe1b4a0dd Fixed email newsletter dropdown settings getting cut off 2022-08-19 16:44:09 +02:00
Hannah Wolfe
d2acf3aada Fixed attribution table missing on cascade delete
refs: https://github.com/TryGhost/Ghost/issues/15252

- all columns with a foreign key (references prop) must have a deletion strategy
- we just found a bug with this in the comments table - see referenced issue
- this fix adjusts the schema and migration for this change before its released so we don't have to write a horrible migration later
2022-08-19 15:28:45 +01:00
Hannah Wolfe
6d53e40bd9 🐛 Fixed broken email prefs link in comment emails
closes: https://github.com/TryGhost/Ghost/issues/15251

- getAdminUrl is a config helper that returns the direct value from config
- change to using urlJoin and urlFor helpers to generate the correct URL
- not entirely happy with this fix as there's no test, but I've verified it locally
2022-08-19 14:29:35 +01:00
Djordje Vlaisavljevic
30b07087eb Updated copy and spacing
refs https://github.com/TryGhost/Team/issues/1727
2022-08-19 15:09:10 +02:00
Djordje Vlaisavljevic
299d8cf931 Updated copy
refs https://github.com/TryGhost/Team/issues/1724
2022-08-19 15:06:59 +02:00
Djordje Vlaisavljevic
112ddb5d00 Updated copy
refs https://github.com/TryGhost/Team/issues/1726
2022-08-19 15:06:59 +02:00
Rishabh
148fea8217 Wired expiring comp subscriptions on Admin
refs https://github.com/TryGhost/Team/issues/1727

- adds alpha feature flag for expiring comped subs
- adds duration to complimentary subs to set expiry
- shows details for expiring comped subs
2022-08-19 18:20:52 +05:30
Rishabh
fa26f6a783 Added scheduled job to clean expired complimentary subs
refs https://github.com/TryGhost/Team/issues/1727

- runs a daily cron job at start of the day to cleanup all expired comped subs
- removes `members<>products` mapping for expired entries, and updates status for corresponding members
- also adds status events for members going back from comp -> free as a result of expiry
- scope for future optimisation on how the scheduled job is ran or does the cleanup
2022-08-19 18:20:52 +05:30
Rishabh
1258156c38 Handled storing complimentary subscription expiry
refs https://github.com/TryGhost/Team/issues/1727

- if feature flag is enabled, handles storing expiry date on complimentary subscriptions in `expiry_at` column of `members_products`
- updates the expiry value on both member edit or add with tiers
- expiry is passed as `expiry_at` in `tiers` list of a member
- includes `expiry_at` on tiers data of a member when flag is enabled
2022-08-19 18:20:52 +05:30
Rishabh
c123fdf5da Added feature flag for cardless trials
refs https://github.com/TryGhost/Team/issues/1727

- adds alpha flag to toggle cardless trials via expiring complimentary subscriptions
2022-08-19 18:20:52 +05:30
Hannah Wolfe
704f17ff96
Added beta search helper implementation (#15236)
refs: TryGhost/Team#1732

- We're testing out the feasibility of having a {{search}} helper that outputs an pre-styled icon to trigger search.
2022-08-19 12:27:38 +01:00
Daniel Lockyer
ddd79494b0
Fixed actions not stored when deleting posts
- if a model is being deleted, `attributes` is an empty object and the
  data we actually need is in `_previousAttributes`
- because of this, only fetching the type using `.get` returned the
  wrong value, and the Action model validator would throw an error
  because we tried to insert an empty type
- we can access the previous value using `.previous(..)`
- this commit fixes saving actions when deleting a post by fetching the
  type from the previous attributes if the current attributes is empty
2022-08-19 13:21:13 +02:00
Hannah Wolfe
1fadbacdec
Fixed content-length in labs snapshot
refs: 22fd7f289c

- in the mentioned commit I changed the tests so that we don't need to update snapshots for every labs flag change
- this commit does the same for content-length which didn't get picked up locally, but does on CI for some reason
- the goal is to allow the team to add and remove flags without needing to update a random snapshot
2022-08-19 10:51:43 +01:00
renovate[bot]
30a9b5d1fa Update peter-evans/create-or-update-comment digest to 7aef7e4 2022-08-19 10:17:25 +02:00
Daniel Lockyer
bf63e250ad Disabled members migrations in test environment
- it turns out we're running the members migration job in tests, and
  these run every time we boot Ghost. Given we wipe the DB each time,
  this forces the job to run, which is just burning valuable test time
- the reason this block of code is slow is because it waits 500ms to see
  if the job has completed
- we run this 55 times, as of writing, during the E2E tests, so that's
  over 27s of idle time
- this commit gates running the migrations to outside of the test environment
2022-08-19 10:03:46 +02:00
Daniel Lockyer
d3a8b64f20
Added name to Custom build workflow
- this was missed from the previous commit but makes it prettier to read
2022-08-19 08:54:38 +02:00
Daniel Lockyer
f133e6af4d
Added workflow to build custom version of Ghost
refs 7913283c96

- you can supply a branch and a version to call it, and it'll produce a
  zip of the tarball you can use
- this should avoid the need for local builds, which are error prone
2022-08-19 08:52:33 +02:00
Rishabh Garg
43b8ad5069
Added expiry column for complimentary subscriptions (#15241)
refs https://github.com/TryGhost/Team/issues/1727

- allows adding expiry date to complimentary subscriptions, effectively allowing cardless trials.
- expiry is stored in members<>products mapping table
2022-08-19 08:41:40 +05:30