Commit Graph

16536 Commits

Author SHA1 Message Date
Peter Zimon
a1b224bec8 Updated copy for new comment email
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Simon Backx
e96ff3fa81 Added comments API like and unlike actions
refs https://github.com/TryGhost/Team/issues/1664

- Added comment-like model
- Added like endpoint
- Added unlike endpoint
- Added basic tests for liking and unliking comments
- Added permissions for liking and unliking
- Added migration for permissions
2022-07-12 10:24:02 +02:00
Kevin Ansfield
1b4f8f0c95 Added WIP author email notifications for new comments
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Kevin Ansfield
25c0b75426 Added comments API tests
refs https://github.com/TryGhost/Team/issues/1664

Note: we put it in the members-comments folder because some issue with test ordering
- refs https://ghost.slack.com/archives/C02G9E68C/p1657538586658649?thread_ts=1657522575.865029&cid=C02G9E68C
- There is something wrong with the url service reset when running multiple tests
- Currently we are doing a soft reset, this needs investigating
- Changing the order so that the comments API tests are executed after the content API tests, fixes the issue too.

Co-authored-by: Simon Backx <simon@ghost.org>
2022-07-12 10:24:02 +02:00
Hannah Wolfe
78c15933e6 Implemented soft delete for comments
refs https://github.com/TryGhost/Team/issues/1664

- comments are marked as deleted, rather than deleted completely
2022-07-12 10:24:02 +02:00
Hannah Wolfe
d4c8660323 Updated comments.add to use member id from cookie
refs https://github.com/TryGhost/Team/issues/1664

- make sure we only create comments for the currently logged in member
2022-07-12 10:24:02 +02:00
Fabien "egg" O'Carroll
3e1e5b6760 Added adminUrl to comments helper script data
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Simon Backx
7d22384d7f Passed post id to comments helper instead of comment id
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Simon Backx
87f714ef25 Added sentry dsn placeholder attribute to comments helper
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Hannah Wolfe
fc99176fdf Moved comments api to members/api/comments
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Hannah Wolfe
f5ccec70b6 Use member cookie on comment API
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Hannah Wolfe
42fc272433 Added members permission system
refs https://github.com/TryGhost/Team/issues/1664

- the new member comments API needs members to have permissions to edit and delete their own posts
- added members as a provider, and then wired up permissible logic at the model level
2022-07-12 10:24:02 +02:00
Hannah Wolfe
00110e541e Added basic comment CRUD model + API
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Kevin Ansfield
a5874f90fe Added initial Comment model
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Fabien "egg" O'Carroll
ed7ce2c00f Added initial auth frame
refs https://github.com/TryGhost/Team/issues/1664

This has no security features, we need to replace usage of "*" with the origin of
the frontend site.
2022-07-12 10:24:02 +02:00
Kevin Ansfield
e60ec64454 Added WIP frontend comments app
refs https://github.com/TryGhost/Team/issues/1664
2022-07-12 10:24:02 +02:00
Daniel Lockyer
1dd83e1a0f Added Ghost Explore endpoint
- this new endpoint returns a special set of data for use in Ghost Explore
2022-07-11 16:48:40 +01:00
renovate[bot]
4134a6ac4c
Update dependency luxon to v2.5.0 2022-07-11 05:29:16 +00:00
renovate[bot]
780731c8a4
Update metascraper to v5.29.15 2022-07-11 02:23:49 +00:00
renovate[bot]
a07a2361d0
Update dependency @sentry/node to v7.6.0 2022-07-08 23:27:24 +00:00
Fabien "egg" O'Carroll
c756966ce9
Updated admin cookie samesite attribute to 'none'
refs https://github.com/TryGhost/Team/issues/1664

We want to have the ability for the frontend to be aware of and make use of
sessions with the admin. Because these run on different domains we need to
update the cookie attributes to be more lax in terms of cross domain usage.
2022-07-08 16:27:49 +02:00
Kevin Ansfield
fc381b7626 Added comment CRUD+Moderate permissions
refs: https://github.com/TryGhost/Team/issues/1664

- added permissions for comments, including updating test fixtures

Co-authored-by: Simon Backx <simon@ghost.org>
2022-07-08 15:46:11 +02:00
Kevin Ansfield
b88212b603 Added comments_enabled setting
refs https://github.com/TryGhost/Team/issues/1664

- comments are disabled by default, but can be enabled on any site
2022-07-08 15:46:11 +02:00
Kevin Ansfield
301ae61aa9 Added users.comment_notifications field
refs: https://github.com/TryGhost/Team/issues/1668

- temporary solution until `user_settings` table is in place
2022-07-08 15:46:11 +02:00
Kevin Ansfield
fa59286eff Added comment related fields to members table
refs https://github.com/TryGhost/Team/issues/1664

- `last_commented_at` - to be used for filtering members list in Admin
- `bio` - short field used to show a "title" or similar context alongside name when commenting
- `enable_comment_notifications` - setting for turning on/off email notification of comment replies
2022-07-08 15:46:11 +02:00
Kevin Ansfield
a78eed1799 Added comment_reports table creation migration
refs https://github.com/TryGhost/Team/issues/1664

- new table to handle moderation reports on comments. This is not a join table, so it is comment_reports, rather than comments_reports
2022-07-08 15:46:11 +02:00
Kevin Ansfield
959786b71f Added comment_likes table creation migration
refs https://github.com/TryGhost/Team/issues/1664

- new table to handle likes on comments. This is not a join table, so it is comment_likes, rather than comments_likes
2022-07-08 15:46:11 +02:00
Kevin Ansfield
799a42062c Added comments table creation migration (#14998)
refs https://github.com/TryGhost/Team/issues/1664

Field notes:

- `parent_id` - used for nested comments but will be limited to 1 level in app-level validation
- `member_id` - when a member is deleted for now the member id is kept but in the future may be removed, hence `nullable: true`
- `status` - "hidden" status will be used when a staff user hides a comment, "deleted" is used when a comment author deletes
- `html` - will store pre-sanitised html
- `edited_at` - used to show an "X edited at Y" note when displaying comments, separate to `updated_at` because changing the status would also change `updated_at` but shouldn't show the "edited at" UI
2022-07-08 15:46:11 +02:00
Daniel Lockyer
6d521cc14c Added migration for Ghost Explore permissions
- this adds permissions so the Ghost Explore integration has permission
  to access the `/explore/` endpoint
2022-07-08 11:54:31 +02:00
Daniel Lockyer
3747df1bc8
Added migrations for Ghost Explore integration and API key (#15011) 2022-07-08 09:55:58 +02:00
renovate[bot]
1cadf85020 Update dependency @playwright/test to v1.23.2 2022-07-08 08:45:34 +02:00
Rishabh
ecce576bc8 Updated sodo search script to include admin url
refs https://github.com/TryGhost/Team/issues/1665

- sodo search script only needs the admin url for fetching data from content api
- removes site url and updates the main url to use admin domain
2022-07-07 11:01:21 +02:00
Renovate Bot
dc3a6a4eaa Update peter-evans/create-or-update-comment digest to b95e16d 2022-07-07 08:59:57 +02:00
renovate[bot]
3e1978fd18 Update dependency @sentry/node to v7 2022-07-07 08:58:02 +02:00
Ronald Langeveld
2bf4344a63
🐛 Fixed API excerpt field issue (#15005)
* 🐛 Fixed API excerpt field issue
ref https://github.com/TryGhost/Ghost/issues/10396

This fix now allows the API user to add field `excerpt` without the need for `plaintext` as format.
Also added new tests for these functions.
* Added new logic that takes `custom_excerpt` into account if all posts gets queried.
* Removed limits in excerpt & plaintext post.
* Updated snapshot.
2022-07-06 17:57:04 +02:00
Ronald Langeveld
9e8bbc028d Revert "migrated excerpt fix"
This reverts commit 35ab123499.
2022-07-06 12:42:22 +02:00
Ronald Langeveld
f20618679a Revert "fixed linting"
This reverts commit bb509ee02c.
2022-07-06 12:42:13 +02:00
Ronald Langeveld
e8306ffa29 Revert "Revert "Updated sodo search test script with version data""
This reverts commit 7c1ef4ecd0.
2022-07-06 12:41:42 +02:00
Ronald Langeveld
7c1ef4ecd0 Revert "Updated sodo search test script with version data"
This reverts commit 7cb37d9091.
2022-07-06 12:28:10 +02:00
Ronald Langeveld
569e16ee1d Revert "updated snapshots"
This reverts commit 4f43c52637.
2022-07-06 12:24:41 +02:00
Ronald Langeveld
4f43c52637 updated snapshots 2022-07-06 11:07:06 +02:00
Ronald Langeveld
bb509ee02c fixed linting 2022-07-06 11:07:06 +02:00
Ronald Langeveld
35ab123499 migrated excerpt fix 2022-07-06 11:07:06 +02:00
Rishabh
7cb37d9091 Updated sodo search test script with version data
refs https://github.com/TryGhost/Team/issues/1665

- sodo search now includes version data in config to allow fetching css directly
2022-07-06 10:47:07 +02:00
Rishabh
67a60353c3 Added version information in sodo search config
refs https://github.com/TryGhost/Team/issues/1665

- version information allows creating the css bundle link for prod
- adds version information from the config
2022-07-06 10:11:15 +02:00
Daniel Lockyer
0aa5748951
Deleted urls.json file
fixes https://github.com/TryGhost/Toolbox/issues/253

- this file is not used and is outdated, so we can just clean it up by
  deleting the file
2022-07-05 15:50:15 +02:00
Daniel Lockyer
ede8b5117b
Merged v5.2.4 into main
v5.2.4
2022-07-05 10:52:52 +02:00
Daniel Lockyer
03c9fd47fa v5.2.4 2022-07-05 09:50:40 +01:00
Daniel Lockyer
a6150bc2df Updated Admin to v5.2.4 2022-07-05 09:50:40 +01:00
renovate[bot]
1bc6148e28
Update dependency supertest to v6.2.4 2022-07-04 17:30:52 +00:00