refs. https://github.com/TryGhost/Toolbox/issues/356
- The page title in Audit log didn't reset the filters and the search value
- Also, the button on the empty list screen didn't work
closes https://github.com/TryGhost/Toolbox/issues/386
- When the API request was made using staff token the source attribution was "user" instead of "api". Misattribution caused ripple effects in limit service.
- The fix also adds a new combination of data available on the `req` object - both `user` and `api_key` can be present when the request is done using a staff (user) token. Having both pieces of data on the request object gives more context for business logic, did not find a good reason to keep it "pure" with either `api_key` or `user` property.
refs https://github.com/TryGhost/Toolbox/issues/386
- Reusing tontext mapping logic to improve maintainability. It seems like the `update` method was not updated properly or intentionally was left out from 'import' source as that should not ever happen theoretically. Probably the latter is most likely.
- My reasoning on reusing same context to source mapping is: it is better to attribute an appropriate "import" source here. Who knows, maybe we'll have logic in the future where the importer updates instead of skipping existing members. It would not make sense to attribute the source to 'member' in that case, amirite?
- This refactor also makes maintainability of this code way easier
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.
- 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
- 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
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
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
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
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
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
- 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
- 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
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
- 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
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
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
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