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

Auditing: add tracking of modified fields #301

Merged
merged 10 commits into from
Apr 13, 2021

Conversation

LukasLohoff
Copy link
Member

@LukasLohoff LukasLohoff commented Apr 9, 2021

Enables tracking of modified columns in audit tables.

findRevisions now contains a new property content.metadata.changedFields which contains all of the property names (on class level, not database) of changed fields in that revision.

  • adds a custom RevisionRepository interface & implementation and overrides a couple of classes to integrate modified column information into revision metadata
  • adds a _mod column to each entity via migration
    • this needs to be done for custom entities in projects using shogun with auditing enabled (breaking change)
  • updates readme with info about auditing

Uses and modifies some classes from https://github.com/spring-projects/spring-data-envers which is licensed under the Apache 2.0 license.

@terrestris/devs Please review

@LukasLohoff LukasLohoff marked this pull request as ready for review April 12, 2021 08:28
@LukasLohoff LukasLohoff changed the title WIP: Audit mod tracking Auditing: add tracking of modified fields Apr 12, 2021
Copy link
Member

@ahennr ahennr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive work @LukasLohoff 🔝 , just some minor issues

Copy link
Member

@dnlkoch dnlkoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice @LukasLohoff!

@LukasLohoff
Copy link
Member Author

Thanks for reviewing 👍

@LukasLohoff LukasLohoff merged commit 0ca106d into terrestris:master Apr 13, 2021
@marcjansen
Copy link
Member

Very impressive work.

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

Successfully merging this pull request may close these issues.

4 participants