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

Soft delete functionality #1891

Merged
merged 8 commits into from
Feb 20, 2024
Merged

Soft delete functionality #1891

merged 8 commits into from
Feb 20, 2024

Conversation

andrewbrazzatti
Copy link
Contributor

@andrewbrazzatti andrewbrazzatti commented Feb 15, 2024

This PR incorporates the new storage driver functions released in sails-hook-redbox-storage-mongo and adds webservice endpoints to support:

  1. Soft deletion of records (records move to a deleted record collection rather than being permanently deleted)
  2. List deleted records
  3. Restore a deleted record
  4. Permanently destroy a deleted record

Also incorporates the new redbox-core-types version v1.4.3 which adds support for including the type of action occurred on the record (i.e. created, updated, deleted, recovered or destroyed).

Adds deleted record methods to the StorageService interface.
Implemented methods in RecordService interface.
Added support for permanent delete option  in webservice delete API endpoint
Fixed delete call in RecordController to match new method signature
…gh the storage service tier.

Added audit event action string to log the type of action the user performed on the record.
Added audit events for delete actions
Changed permanently deleted record action type to destroyed for better consistency
Installed core types 1.4.3 to redbox-portal
Refactoed RecordsService to use destroyed RecordAuditActionType
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (49c7d32) 70.06% compared to head (2d8e85f) 70.06%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1891   +/-   ##
========================================
  Coverage    70.06%   70.06%           
========================================
  Files          112      112           
  Lines         1871     1871           
  Branches       218      218           
========================================
  Hits          1311     1311           
  Misses         560      560           
Flag Coverage Δ
frontend-core-lib 52.41% <ø> (ø)
frontend-dashboard 88.07% <ø> (ø)
frontend-export 100.00% <ø> (ø)
frontend-local-auth 100.00% <ø> (ø)
frontend-manage-roles 63.33% <ø> (ø)
frontend-manage-users 59.81% <ø> (ø)
frontend-report 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewbrazzatti andrewbrazzatti merged commit bbba982 into develop Feb 20, 2024
7 checks passed
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.

1 participant