Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#21288 closed enhancement (fixed)

Add meta cap for publish_post

Reported by: gcorne's profile gcorne Owned by: ryan's profile ryan
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords: has-patch
Focuses: Cc:

Description

While throughout the core codebase meta_caps for read_post, edit_post, and delete_post are used, there isn't a meta_cap for publish_post. For completeness, there should also be a meta_cap for create_post. Having more granular capabilities is important for developers that are trying to use WordPress for larger, more complex installations or as more of an application development framework.

Attachments (1)

21288.diff (552 bytes) - added by nacin 12 years ago.
I guess this is the crux of it.

Download all attachments as: .zip

Change History (11)

#1 @scribu
12 years ago

  • Summary changed from Add meta caps for publish_post and perhaps create_post to Add meta cap for publish_post

For create_post: #16714

#2 @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5

We should definitely have a cap for publish_post.

#3 @greenshady
12 years ago

  • Cc justin@… added

#4 @bpetty
12 years ago

  • Keywords needs-patch added

#5 @technosailor
12 years ago

There isn't edit_post, et all, but there is edit_posts. There is also publish_posts. Was this ticket fixed and not closed?

#6 @technosailor
12 years ago

meta_cap... Ignore me.

@nacin
12 years ago

I guess this is the crux of it.

#7 @nacin
12 years ago

  • Keywords has-patch added; needs-patch removed

#8 @ryan
12 years ago

Looks good.

#9 @ryan
12 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [22056]:

Add publish_post meta cap. Props nacin. fixes #21288

Note: See TracTickets for help on using tickets.