harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
37 stars 30 forks source link

Allow Playwright PDF export to access private casebooks when authorized #1905

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

The Playwright browser running inside celery starts a new, unauthorized session when requesting a PDF for export. This means that by default, only public casebooks can be exported as PDFs.

Users should be able to make PDFs of their own private casebooks.

Establish a method for the Playwright task to safely access a private casebook only when requested by a user authorized to view that same casebook.