Editor-created subdocuments not appearing in trash after deletion
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- authorization, backend
Research direction
No files or tests are named in the issue. Start by tracing the subdocument deletion and trash/ownership paths in the Django backend, then add or run coverage for editor-created subdocuments; done means the reproducer places the deleted subdocument in User B's trash without changing owner-created behavior.
Written by the indexing model from the issue text.
Description
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
- User A owns a document.
- User B (editor) creates a subdocument within User A's document.
- User B deletes the subdocument they created.
- 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
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 638
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 40
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from suitenumerique/docs
-
backend performance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
suitenumerique/docs#2656 · 1 comment ·
-
✏️ Needs design frontend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
suitenumerique/docs#2612 · 2 comments ·
-
backend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
suitenumerique/docs#2589 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
suitenumerique/docs#2541 ·
-
backend enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
suitenumerique/docs#2216 ·
All issues in suitenumerique/docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100