#11873 closed defect (bug) (worksforme)
Contributors can restore posts trashed by editors
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Trash | Keywords: | |
Focuses: | Cc: |
Description
Legend:
editor - has the publish_posts capability
contributor - doesn't have the publish_posts capability
If an editor moves a post to trash, the post author is able to republish the post, even if he's a contributor.
Steps to reproduce:
- contributor: submit a post for review
- editor: publish post
- editor: trash post
- contributor: restore post
So, to prevent a contributor from republishing trashed posts, an editor has the following workarounds:
- permanently delete the post
- set the post status to 'pending' before trashing it
Neither of these is optimal.
[11873] doesn't seem to address this properly.
Change History (7)
#2
@
15 years ago
- Summary changed from Contributors can restore trashed posts to Contributors can restore posts trashed by editors
#3
@
15 years ago
Contributors shouldn't be able to trash/untrash any published posts, that's not their role. We should be checking current_user_can('publish_posts')
and perhaps have an exception when post_status in pending and post_author is a contributor.
#4
@
15 years ago
Currently a contributor can see the contents of the trash, so I guess that should be addressed too.
How about a new capability: current_user_can('use_trash'). I think it would simplify a lot of the code related to Trash.
Ideally, a distinction should be made:
A contributor can restore one of his posts only if it was trashed by himself, not by an editor.