adobe / da-admin

Apache License 2.0
0 stars 4 forks source link

Versioning & Audit Logs #27

Closed karlpauls closed 4 months ago

karlpauls commented 4 months ago

Description

Add an audit log trail for document changes and a way to create versions for documents.

Related Issue

6

5

Motivation and Context

When updating documents it currently is not recorded who did the change nor that a change happened at all. This PR adds this functionality by creating empty files in R2 where it stores the information about the author(s) in the metadata. Additionally, it allows a user to request that the current state becomes a version which means that in addition to the above metadata the file is not empty but captures the content in the document at the time of the request. The versions as well as the audit log history is exposed via a new endpoint.

How Has This Been Tested?

Tested locally against live storage

Screenshots (if appropriate):

Types of changes

Checklist:

Release notes

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (a350e1d) to head (77a050c). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #27 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 4 4 Lines 219 221 +2 ========================================= + Hits 219 221 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.