Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#39939 new defect (bug)

A Contributor cannot preview their own post if it's scheduled

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Posts, Post Types Keywords: needs-patch needs-unit-tests
Focuses: administration Cc:

Description

Steps to reproduce:

  1. A Contributor writes a post and submits it for review. At this point they can preview their post.
  2. An Editor or Administrator approves the post and schedules it for publication at a later date.
  3. The contributor viewing the Posts listing table can no longer preview their post.

Previously: #33694

Change History (3)

#1 follow-up: @dhanendran
8 years ago

We don't have any specific cap for previewing a post. If we enable edit_post then contributor may edit the approved post and it may published on scheduled time before reviewed it again.

So the possible solution would be, we can add additional condition while showing the preview link and post preview cap change.

#2 in reply to: ↑ 1 @johnbillion
8 years ago

Replying to dhanendran:

We don't have any specific cap for previewing a post.

Good point. This reminds me that I started work on this a while ago but ended up down a rabbit hole: #33240

#3 @dhanendran
8 years ago

Instead of creating a new cap and patching it in several places, can we create a common hook which can alter the cap permissions. In this case, we can use a filter to remove Edit and Quick Edit from edit_post capability. So user use only preview option.

Just a thought...

Note: See TracTickets for help on using tickets.