What it says on the tin: moderators (or roles with the corresponding permission) should be able to delete threads, contributions or comments.
Note: this issue doesn't cover logging the deletion or displaying information about the deletion to users. This is about offering a soft delete option similar to the one I've been using straight from the database, but making it available beyond me.
Flow
If the user has the corresponding permission, a "delete thread/contribution/comment" option is added to the dropdown menu of the corresponding entity.
A popup is displayed to the user, asking to confirm the action.
If the action is confirmed, a request for deletion is sent to the the server.
Implementation steps
Implement hard deletion for threads
Implement soft deletion for threads
Do the same for contributions
Do the same for comments
The following tasklist is an example of implementation steps for deleting threads. We'll likely need to open other issues for contributions and comments:
### Backend tasks
- [ ] Write OpenAPI definition for delete thread endpoint
- [ ] Add `delete_threads` (`delete_contributions`|`delete_comments`) permissions to the backend
- [ ] Add an endpoint to delete a thread
- [ ] Write SQL queries to hard delete thread on the backend
- [ ] Write tests for endpoint
- [ ] Gate deletion of a thread on correct permissions
### Frontend tasks
- [ ] Add delete button to the frontend
- [ ] Add confirmation popup
- [ ] Send request to the backend
Description
What it says on the tin: moderators (or roles with the corresponding permission) should be able to delete threads, contributions or comments.
Note: this issue doesn't cover logging the deletion or displaying information about the deletion to users. This is about offering a soft delete option similar to the one I've been using straight from the database, but making it available beyond me.
Flow
Implementation steps
The following tasklist is an example of implementation steps for deleting threads. We'll likely need to open other issues for contributions and comments:
TODO: make a separate issue for soft delete