Editor-created subdocuments not appearing in trash after deletion

Aperta
#2,571 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@RoeeSivan ci sta già lavorando.

Dal 5/10/2026.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
django, python

Direzione di ricerca

Nell’issue non sono indicati file o test. Inizia tracciando i percorsi di eliminazione dei sottodocumenti e del cestino/proprietà nel backend Django, quindi aggiungi o esegui la coverage per i sottodocumenti creati dall’editor; il lavoro è completato quando il reproducer inserisce il sottodocumento eliminato nel cestino di User B senza modificare il comportamento dei sottodocumenti creati dal proprietario.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backend bug

Bug Report

Problematic behavior
When a user with editor permissions (not the owner) creates a subdocument within a document and then deletes it, the subdocument does not appear in their trash. This behavior is inconsistent with what he is prompted in the delete modal.

Expected behavior/code
Any subdocument created by a user, even within a document they only have editor permissions for, should be treated as their property. Deleting such a subdocument should move it to the user's trash.

Steps to Reproduce

  1. User A owns a document.
  2. User B (editor) creates a subdocument within User A's document.
  3. User B deletes the subdocument they created.
  4. The deleted subdocument does not appear in User B's trash.

Environment

  • Docs version: 5.4.1
  • Instance URL: docs.numerique.gouv.fr

Possible Solution
The system should recognize that subdocuments created by a user are their property, regardless of their role in the parent document. Deleting such subdocuments should move them to the user's trash.

Additional context/Screenshots

  • This issue affects users who are not owners but have editor permissions.
  • Clarifying ownership rules for subdocuments created by editors could resolve this inconsistency.

https://github.com/user-attachments/assets/dc77c8db-c072-484b-8383-1649e96df047

Lingua principale
TypeScript
Stelle
17k
Fork
705
Merge medio
4g 13h
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di suitenumerique/docs

Tutte le issue di suitenumerique/docs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.