include collection names on audit-log table#50
Open
JustRelaxable wants to merge 1 commit intoshaadcode:mainfrom
Open
include collection names on audit-log table#50JustRelaxable wants to merge 1 commit intoshaadcode:mainfrom
JustRelaxable wants to merge 1 commit intoshaadcode:mainfrom
Conversation
Hi, the current implementation of the plugin assumes the changes only comes from the users collection. However Payload CMS supports auth enabled collections, and it is important to log their changes too.
Owner
|
Thank you sincerely for your effort to improve payload-auditor. Considering that currently payload-auditor performs somewhat weakly in default collection management, your idea is very good and practical and can solve a problem. But we need to examine more aspects because this PR will change the depth of the plugin architecture and may increase the plugin size. I will look into this as soon as possible. Thank you for your cooperation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, the current implementation of the plugin assumes the changes only comes from the users collection. However Payload CMS supports auth enabled collections, and it is important to log their changes too.
This PR aims to change auditor table column
name: 'user', type: 'relationship', relationTo: 'users'toname: 'user', type: 'json', required: falseto be able to save both CollectionSlug as well as the ID. I also tried to create a custom component to render default RelationshipInput on admin panel UI but with plugins it may not be possible to use custom component.The aim is to save both collection name and id of the user, account or whatever auth:true collection and render RelationshipInput UI on admin panel.
Users collection:

App Account collection:
