TK-90: Track audit trail for Information Sharing Agreement changes - #72
Draft
burkkyy wants to merge 1 commit into
Draft
TK-90: Track audit trail for Information Sharing Agreement changes#72burkkyy wants to merge 1 commit into
burkkyy wants to merge 1 commit into
Conversation
…r first publish. Why? Agreements are drafted and revised freely before they are published, so the initial draft should not be recorded. Once an agreement is signed, every subsequent change matters and must be traceable. What? Auditing is off until an agreement is first signed. Signing turns it on and records a "Signed" entry; after that, edits record "Updated" and reverting to draft records "Reverted to draft". A read-only Audit tab on the admin agreement page lists the trail once auditing is enabled. NOTE: adds an audit_enabled flag to information_sharing_agreements (backfilled true for already-published agreements) plus an information_sharing_agreement_audits table. See https://yg-hpw.atlassian.net/browse/TK-90
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.
Context
Information Sharing Agreements are drafted and revised freely before they are published, so the first draft should not be recorded. Once an agreement is signed, every later change matters and must be traceable.
This adds an audit trail that stays off until an agreement is first signed, then records all subsequent activity.
Implementation
audit_enabledflag toinformation_sharing_agreements(backfilledtruefor already-published agreements) and a newinformation_sharing_agreement_auditstable.GET /api/information-sharing-agreements/:id/auditsendpoint, scoped to system admins or the agreement creator.Testing Instructions
dev test.dev up.Fixes https://yg-hpw.atlassian.net/browse/TK-90