Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

fix: Prevent previously uploaded evidence from being deleted #133

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

wadedvsa
Copy link
Contributor

Description

Prevent previously uploaded files from being deleted.

Related issue: VOL-3200

Before submitting (or marking as "ready for review")

  • Does the pull request title follow the conventional commit specification?
  • Have you performed a self-review of the code
  • Have you have added tests that prove the fix or feature is effective and working
  • Did you make sure to update any documentation relating to this change?

@jerotire
Copy link
Contributor

jerotire commented Apr 19, 2024

Nice to see this being addressed. It was a question we raised when doing the CanAccessDocument validator refactor. The DeleteDocument command also uses the same validation (if you can access it, there's a risk you can delete it, even after submission for example). It was proposed a new validator CanDeleteDocument be created, which does the CanAccessDocument checks, but in addition to parsing extra logic (example.. how long ago since upload, is it refering an application/licence in force or under consideration etc...). I am wondering if we think about that in this PR? Or is it too out of scope? @wadedvsa

@jerotire
Copy link
Contributor

jerotire commented Apr 19, 2024

Nice to see this being addressed. It was a question we raised when doing the CanAccessDocument validator refactor. The DeleteDocument command also uses the same validation (if you can access it, there's a risk you can delete it, even after submission for example). It was proposed a new validator CanDeleteDocument be created, which does the CanAccessDocument checks, but in addition to parsing extra logic (example.. how long ago since upload, is it refering an application/licence in force or under consideration etc...). I am wondering if we think about that in this PR? Or is it too out of scope? @wadedvsa

CC: @hobbyhacker0

@wadedvsa
Copy link
Contributor Author

@jerotire I'd say definitely out of scope for this, that sounds like it needs its own dedicated ticket.

@wadedvsa wadedvsa merged commit 761fe35 into main Apr 22, 2024
6 checks passed
@wadedvsa wadedvsa deleted the bugfix/VOL-3200-prevent-deleting-old-files branch April 22, 2024 09:42
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