Skip to content

Editor-created subdocuments not appearing in trash after deletion #2571

Description

@virgile-dev

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.
Capture.video.du.2026-08-08.09-49-57.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugSomething isn't working

    Type

    Projects

    Status
    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions