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

DMP-4663: Add audit_user to revInfo table for Envers auditing #2496

Merged
merged 29 commits into from
Feb 4, 2025

Conversation

Ben-Edwards-cgi
Copy link
Contributor

Links

Jira

Change description

Summary of Git Diff

This Git Diff introduces a new auditing feature to track user actions by adding an audit_user field to the RevisionInfo entity and implementing an AuditorRevisionListener. It includes tests for the listener functionality and updates the database schema to support the new field.

Highlights

  • New Files Added:

    • AuditorRevisionListenerITest.java: Integration test for auditing functionality.
    • RevisionInfo.java: Model class for storing revision details in the database.
    • AuditorRevisionListener.java: Listener class for handling new revisions and setting the audit user.
    • V1_434__addedAuditUserToRevInfo.sql: SQL migration script to add the audit_user column to the revinfo table.
    • AuditorRevisionListenerTest.java: Unit tests for the AuditorRevisionListener class.
  • Key Changes:

    • The RevisionInfo class now includes an auditUser field to store the ID of the user making changes.
    • The AuditorRevisionListener captures the user information from the JWT token when a new revision is created.
    • A database migration script was added to alter the revinfo table and include the new audit_user column.
    • Tests ensure correct functionality of user retrieval and proper setting of the auditUser field during revisions.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[X] No

@Ben-Edwards-cgi Ben-Edwards-cgi enabled auto-merge (squash) February 3, 2025 16:53
@Ben-Edwards-cgi Ben-Edwards-cgi merged commit 83fb9ac into master Feb 4, 2025
10 checks passed
@Ben-Edwards-cgi Ben-Edwards-cgi deleted the DMP-4663 branch February 4, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants