Book navigation block doesn't appear on unpublished book outline pages
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3020298. -->
Reported by: [dddbbb](https://www.drupal.org/user/484924)
Related to !43
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Users with access to view unpublished nodes cannot see the book navigation block when they're on an unpublished book page.<br>
This is an unexpected behaviour and it is even more pronounced after <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/26552" title="Status: Closed (fixed)">#26552: Allow users with access to unpublished nodes to create unpublished books</a></span>.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>- Enable core "Book" module and set the basic configuration for the content type under <code>/admin/structure/book/settings</code>.<br>
- Make sure the current user can see unpublished nodes (or at least the content types selected above).<br>
- Create an unpublished top level book page and add few unpublished child pages.<br>
- Place the "Book navigation" block in a visible region, selecting "Show block only on book pages" in the block settings and without further "Visibility" conditions.<br>
- Visit any of the unpublished book pages.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Introducing a dedicated "View navigation for unpublished books" permission in order to only display the block when the user is browsing a book on unpublished nodes (which the user has already permission to see).</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>- None -</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>The Book navigation block will be visible on unpublished nodes if the user has been given access to "View navigation for unpublished books" permission. The block will also contain navigation links to unpublished nodes of the same book.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>- None -</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>- None -</p>
<p><strong>Before patch:<strong><br>
<img src="https://www.drupal.org/files/issues/2021-03-05/Before--patch.jpg" alt="Book nav before patch"></strong></strong></p>
<p><strong>After patch:<strong><br>
<img src="https://www.drupal.org/files/issues/2021-03-05/After---patch.jpg" alt="Book nav after patch"></strong></strong></p>
> Related issue: [Issue #26552](https://www.drupal.org/node/26552)
issue