Skip to content

Commit 30c52d3

Browse files
committed
audit logs
1 parent fd9b176 commit 30c52d3

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

plugins/hooks/api/api.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,8 @@ plugins.register("/i/hook/save", function(ob) {
306306
if (!err) {
307307
// Audit log: Hook updated
308308
plugins.dispatch("/systemlogs", {
309-
params: params,
310-
action: "hook_updated",
309+
params: params,
310+
action: "hook_updated",
311311
data: { updated: result.value }
312312
});
313313
common.returnOutput(params, result && result.value);
@@ -479,12 +479,6 @@ plugins.register("/o/hook/list", function(ob) {
479479
const member = _.find(members, {_id: a.createdBy});
480480
a.createdByUser = member && member.full_name;
481481
});
482-
// Audit log: Hook list viewed (without logging individual hooks)
483-
plugins.dispatch("/systemlogs", {
484-
params: params,
485-
action: "hook_list_viewed",
486-
data: { hookCount: hooksList.length, requestedBy: params.member._id }
487-
});
488482
common.returnOutput(params, { hooksList } || []);
489483
});
490484
});

plugins/hooks/frontend/public/localization/hooks.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,9 @@ hooks.actions-tips = Select the actions the hook will do upon being triggered. Y
143143
hooks.application-tips = The app(s) for which you want to create a hook.
144144
hooks.trigger-count-tips = Number of times the hook has been triggered.
145145
hooks.trigger-action-tips = Identifies the trigger for the hook, and the actions that show the method through which data will be sent.
146-
hooks.trigger-save-failed = Hook could not be saved.
146+
hooks.trigger-save-failed = Hook could not be saved.
147+
148+
systemlogs.action.hook_created = Hook Created
149+
systemlogs.action.hook_updated = Hook Updated
150+
systemlogs.action.hook_status_updated = Hook Status Updated
151+
systemlogs.action.hook_deleted = Hook Deleted

0 commit comments

Comments
 (0)