-
Notifications
You must be signed in to change notification settings - Fork 981
[SER-1922] add audit logs to hook create edit delete actions #5584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SER-1922] add audit logs to hook create edit delete actions #5584
Conversation
ArtursKadikis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to pass linter
ArtursKadikis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to use localization for our audit log entries.
For that to happen properly, you need to specify localization in the following form:
localization in this form: systemlogs.action.{ACTION}
An example of that can be seen here:
https://github.com/Countly/countly-server/blob/master/plugins/views/frontend/public/localization/views.properties#L67-L68
In your case and "action" is smth like "hook_updated". So you would have the localization entry with the following key:
systemlogs.action.hook_updated
This will then allow it to be automatically be picked up by the system.
Let us also add the "_id" for both creation and updating. That is useful debugging information.
We can also remove the audit entry for "hook_list_viewed". This would not be relevant to the audit log and too spammy.
|
The audit logs used are kept in params. The params object holds the details of the operation performed on the hook (updated, created, status updated, deleted). The example of hook_created log look like; "created": { |
ArtursKadikis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let us change "update", "created". Let us add comments for example values that would be in those variables
No description provided.