Opened 3 years ago
Last modified 3 years ago
#55106 new feature request
Split publish_posts in publish_posts and publish_others_posts
Reported by: | freakenstein | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | |
Focuses: | administration | Cc: |
Description ¶
While working on a multisite blog I've found that several capabilities have an _others_ version, but is missing on the publish_posts
capability.
This is important because you currently can't limit someone to publish only his/her own posts. It's all or nothing. Example: a newly added Author can publish a draft from the Administrator.
It can also be seen as a feature the other way around: when everyone has only publish_others_posts
capabilities, every posts has to get a second pair of eyes before getting published.
I suggest implementing:
publish_posts
- Controls whether objects of this type owned by current user can be published. Set as default capability of Super Admin, Administrator, Editor, Author.
publish_others_posts
- Controls whether objects of this type owned by other users can be published. If the post type does not support an author, then this will behave like publish_posts. Set as default capability of Super Admin, Administrator, Editor.
Pull Requests
- Loading…
Change History (3)
#1
in reply to:
↑ description
;
follow-up:
↓ 2
@
3 years ago
#2
in reply to:
↑ 1
@
3 years ago
Replying to knutsp:
Replying to freakenstein:
While working on a multisite blog I've found that several capabilities have an _others_ version, but is missing on the
publish_posts
capability.
This is important because you currently can't limit someone to publish only his/her own posts. It's all or nothing. Example: a newly added Author can publish a draft from the Administrator.
An Author can only publish (or edit) own posts - unless other capabilities added to role or user. https://wordpress.org/support/article/roles-and-capabilities/
You are right, I made an error is my test setup. The Author is limited to this action by not having edit_others_posts
.
Still, I see use for this change as a feature. Having own rights to publish and able to edit other users posts, should not necessary result in being able to publish other people posts.
#3
@
3 years ago
I would recommend closing this ticket as a duplicate of #40197. Although the two tickets propose different approaches, I think the approach proposed by the other ticket is more realistic. Based on my reading of past tickets similar to this one, the chance of changing the default behaviour of capabilities is practically negligible. You would still be able to implement the behaviours you describe using the publish_post
capability and map_meta_cap
filter, which the other ticket is seeking to implement. @johnbillion
Replying to freakenstein:
An Author can only publish (or edit) own posts - unless other capabilities added to role or user. https://wordpress.org/support/article/roles-and-capabilities/