]> BookStack Code Mirror - bookstack/commit
Fixed book-tree-gen page visibility issue
authorDan Brown <redacted>
Thu, 17 Dec 2020 17:31:18 +0000 (17:31 +0000)
committerDan Brown <redacted>
Thu, 17 Dec 2020 17:31:18 +0000 (17:31 +0000)
commit3f3fad7113344ac262111cce049ed3b11d2d7f83
tree94fcbb4762be4f1411f47a4dce04b99177a32b38
parent884664bfe98f4fe412f1d8a80603257e955b40bd
Fixed book-tree-gen page visibility issue

When book trees were generated, pages in chapters where ALL pages within
were not supposed to be visibile, would be visible due to the code
falling back on the raw relation which would not account for
permissions.

This has now been changed so that a custom 'visible_pages' attribute is set and used by any book tree structures, to ensure it does not fall back to the raw relation.

Added an extra test to cover.

For #2414
app/Entities/Chapter.php
app/Entities/Managers/BookContents.php
resources/views/books/export.blade.php
resources/views/books/sort-box.blade.php
resources/views/chapters/child-menu.blade.php
resources/views/chapters/list-item.blade.php
resources/views/partials/book-tree.blade.php
resources/views/search/book.blade.php [deleted file]
tests/Permissions/RestrictionsTest.php