mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-30 23:08:59 -06:00
Fix: prevent note deletion outside doc
This commit is contained in:
@@ -1099,7 +1099,7 @@ class DocumentViewSet(
|
||||
):
|
||||
return HttpResponseForbidden("Insufficient permissions to delete notes")
|
||||
|
||||
note = Note.objects.get(id=int(request.GET.get("id")))
|
||||
note = Note.objects.get(id=int(request.GET.get("id")), document=doc)
|
||||
if settings.AUDIT_LOG_ENABLED:
|
||||
LogEntry.objects.log_create(
|
||||
instance=doc,
|
||||
|
||||
Reference in New Issue
Block a user