Cannot save unpublished versions of published content for users without manage book privileges

Created on 24 October 2017, about 7 years ago
Updated 2 March 2023, over 1 year ago

In 8.4x and beyond , a new validation has been added for BookOutlines core/modules/book/src/Plugin/Validation/Constraint/BookOutlineConstraintValidator.php
The code in this validation plugin compares previous book values and new values and raises exceptions as needed.
When a user doesnt have permission to administer books and when a node is not part of any book, the entity variable doesnt have any book values and hence when trying to save unpublished versions of published content, the following error is being thrown

You can only change the book outline for the published version of this content.

This can be critical for content moderation when users are not allowed to manage books!

Steps to reproduce:

1. As a user without manage books privileges, create an article and publish it (If the user doesnt have publishing rights, publish it with an admin user).
2. Now edit the article as the first user again and try to save it in draft mode.

The node cannot be saved and the error regarding book outline is thrown

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
BookΒ  β†’

Last updated 5 days ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @pwolanin
Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

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