0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added actions events for integrations and webhooks

refs https://github.com/TryGhost/Toolbox/issues/356

- this allows Ghost to collect CRUD events for integrations and
  webhooks, to eventually be shown in the audit log
This commit is contained in:
Daniel Lockyer 2022-08-18 16:46:16 +02:00
parent 37ef0582e6
commit bbb5cd24c8
No known key found for this signature in database
GPG key ID: D21186F0B47295AD
2 changed files with 6 additions and 0 deletions

View file

@ -6,6 +6,9 @@ const {NoPermissionError} = require('@tryghost/errors');
const Integration = ghostBookshelf.Model.extend({ const Integration = ghostBookshelf.Model.extend({
tableName: 'integrations', tableName: 'integrations',
actionsCollectCRUD: true,
actionsResourceType: 'integration',
relationships: ['api_keys', 'webhooks'], relationships: ['api_keys', 'webhooks'],
relationshipBelongsTo: { relationshipBelongsTo: {

View file

@ -7,6 +7,9 @@ let Webhooks;
Webhook = ghostBookshelf.Model.extend({ Webhook = ghostBookshelf.Model.extend({
tableName: 'webhooks', tableName: 'webhooks',
actionsCollectCRUD: true,
actionsResourceType: 'webhook',
defaults() { defaults() {
return { return {
api_version: `v${ghostVersion.safe}`, api_version: `v${ghostVersion.safe}`,