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

Created on 4 March 2021, almost 4 years ago
Updated 1 February 2023, almost 2 years 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 4 days 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.

Production build 0.71.5 2024