pressbooks/pressbooks

Private content can't be viewed (by users other than Editors and Administrators) unless Show in Exports is checked

Closed this issue · 2 comments

tw77 commented

Description

When content is set to private and 'show in exports' is not selected, authenticated users are unable to view the content, even if their permissions should allow them to see the content.

For example, in this globally public book, they have selected the setting that should allow book users added with the role of Subscriber/Collaborator/Author to view pages that they have set to private.
Screenshot 2023-10-31 at 7 52 23 AM

There seems to be a bug here: users with these roles are able to view private front/back matter and chapters in the table of contents when 'Show in Exports' is selected, but they aren't able to load this private content.

Steps to Reproduce

  1. Log in as a test user added to the affected book with the role of Subscriber, Collaborator, or Author.
  2. Navigate to the TOC.
  3. Open one of the private pages in the TOC with a lock symbol next to it, e.g.: Screenshot 2023-10-31 at 7 55 10 AM

Expected behavior: The private chapter or front/back matter loads.

Actual behavior: Screenshot 2023-10-31 at 7 55 27 AM

tw77 commented

It turns out this is reproducible anywhere: when a page is not shown in exports and not shown in web, it does not load for users with these roles.

tw77 commented

Tested on https://dev.pressbooks.network/ and fix is working as expected.