restrict access to /books/zims endpoint - #542
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #542 +/- ##
==========================================
+ Coverage 81.93% 81.96% +0.03%
==========================================
Files 70 70
Lines 4456 4458 +2
Branches 528 528
==========================================
+ Hits 3651 3654 +3
+ Misses 642 641 -1
Partials 163 163 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I didn't take into account this last comment: #538 (comment) adding new commits... |
elfkuzco
force-pushed
the
restrict-access-to-zims-endpoint
branch
from
September 22, 2026 13:11
baf080e to
a02305d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
This PR uses the list of accessible collection IDs for a user to limit the download/view URLs they get for books. In addition, it adds new roles
collection-viewer,global-viewerand changesviewertopublic-viewer. This allows specific accounts to view books/titles belonging to both public/private collectionsChanges
viewerroles topublic-viewer(which is now the new default)collection-viewerand update codebase to handle it along withcollection-editorget_zim_urlscollection-viewer,global-viewer,public-viewerThis closes #538