Skip to content

Conversation

lunika
Copy link
Member

@lunika lunika commented Aug 22, 2025

Purpose

An editor who created a subpages should be allowed to delete it.
We change the abilities to be coherent between the creation and the
deletion.

Proposal

  • 🐛(backend) allow editor to delete subpages

Fixes #1193

@lunika lunika requested review from sampaccoud and AntoLC August 22, 2025 13:00
@lunika lunika self-assigned this Aug 22, 2025
@lunika lunika added the bug Something isn't working label Aug 22, 2025
@sampaccoud
Copy link
Member

Good point as the owner can still restore from trashbin...

Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected, but I find it is lot of power for the editors, I am wondering if an editor should be able to delete only his own subpages.

can_destroy = is_owner or is_admin or is_creator 

@virgile-dev
Copy link
Collaborator

@AntoLC I agree with you ! Let’s go for what you proposed

@lunika lunika force-pushed the fix/editor-can-delete-subpages branch from 4aba797 to c478359 Compare August 28, 2025 16:07
@lunika lunika changed the title 🐛(backend) allow editor to delete subpages 🐛(backend) allow creator to delete subpages Aug 28, 2025
An editor who created a subpages should be allowed to delete it.
We change the abilities to be coherent between the creation and the
deletion.
Fixes #1193
@lunika lunika force-pushed the fix/editor-can-delete-subpages branch from c478359 to c660534 Compare August 28, 2025 16:08
@lunika
Copy link
Member Author

lunika commented Aug 28, 2025

The implementation I made changed a bit. I think it should be reviewed again.
@qbey can you take a look please ? I made some modification on the document queryset, I would like to have your input.

Copy link

github-actions bot commented Aug 28, 2025

Size Change: +5 B (0%)

Total Size: 3.6 MB

compressed-size-action

@lunika lunika requested a review from qbey August 29, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

♻️(backend) Editor can delete subpages
4 participants