Access denied on node preview page when the user will be blocked by the future revision

Created on 4 March 2021, over 3 years ago
Updated 1 February 2023, over 1 year ago

Problem/Motivation

When editing a node, preview is not viewable if the user is going to be blocked by the new revision's editing page (after saving).
The behavior is counterintuitive... the users should be able to see preview as long as they can access editing page.

Steps to reproduce

- Install Content Moderation
- Create a workflow with moderation states "Draft" and "Published".
- Allow authenticated users to use only "Draft"->"Published" transition (which makes authenticated users unable to edit "Published" revisions.)
- Login as an authenticated user and open a node edit page whose current status is "Draft"
- Set "Published" as next moderation state
- Push "Preview" button

Proposed resolution

Check access on latest revision instead of new revision

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Node systemΒ  β†’

Last updated about 17 hours ago

No maintainer
Created by

πŸ‡―πŸ‡΅Japan snitta

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    Can the MR be updated for 10.1 please

    Also will need a test case to show the issue.

Production build 0.71.5 2024