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

feat: audit log steel thread #364

Merged
merged 11 commits into from
Jan 30, 2024

Conversation

superlinkx
Copy link
Contributor

Description

Steel Thread for Audit Logging

Motivation and Context

We needed to change our approach to audit logging. This contains the first 4 DB methods to get audit logging to use as reference for our other priority 1 audit enabled methods.

How Has This Been Tested?

Existing tests were modified as necessary, but generally kept as close to the originals as possible. Passing tests means there's good confidence that these changes are correct, but additional testing should be completed before the main populate-audit-log-fields gets merged.

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Documentation updates are needed, and have been made accordingly.
  • I have added and/or updated tests to cover my changes.
  • All new and existing tests passed.
  • My changes include a database migration.

This adds a new `AuditableContext` method to the Database, which wraps the Gorm Transaction method with some auditing context and ensures the two phase commit of the audit log is run
fix: use actual AuditData instead of the direct model
fix: incorrect formatting of audit log action names
fix: additional test fixes
@superlinkx superlinkx self-assigned this Jan 30, 2024
@irshadaj irshadaj merged commit 602d04b into populate-audit-log-fields Jan 30, 2024
3 checks passed
@irshadaj irshadaj deleted the audit-log-steel-thread branch January 30, 2024 15:10
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants