Skip to content
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

Option to ignore AuditDelta records for CREATE #112

Open
ovedanner opened this issue Dec 22, 2016 · 2 comments
Open

Option to ignore AuditDelta records for CREATE #112

ovedanner opened this issue Dec 22, 2016 · 2 comments

Comments

@ovedanner
Copy link

Hi,

First off, I really the way this plugin is setup and how it deals with logging. Is it an idea to be able to ignore the creation of AuditDelta records when a resource is created? A full snapshot is already created as an Audit record and setting all values for the first time can lead to the creation of a lot of AuditDelta records.

@xhs345
Copy link
Collaborator

xhs345 commented Dec 22, 2016

Hi,

there is currently no option to disable inserting records to AuditDelta on Create, but it should be an easy change. I guess the best way to make the check is to create a new setting option (e.g. saveDeltaOnCreate .. maybe you have a better idea) and then make some changes around these lines: https://github.com/robwilkerson/CakePHP-Audit-Log-Plugin/blob/master/Model/Behavior/AuditableBehavior.php#L211

I'm still working on a few other updates, so if you want that feature it would be the easiest if you could work on it and send a PR

@ravage84
Copy link
Contributor

It could be a configuration setting like Validation's on key:

http://book.cakephp.org/2.0/en/models/data-validation.html#on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants