WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 15 months ago

#39939 new defect (bug)

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

Reported by: 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
15 months 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
15 months 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
15 months 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.