Repository navigation
fix(auth): enforce admin and library access controls - #316
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #316 +/- ##
==========================================
+ Coverage 50.70% 54.68% +3.97%
==========================================
Files 40 40
Lines 13259 13396 +137
==========================================
+ Hits 6723 7325 +602
+ Misses 6536 6071 -465
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
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.



Description
Require administrator privileges for server settings, scans, metadata changes, cleanup, scheduled tasks, logs, and user management. Hide these controls from standard users and avoid requesting administrator-only data in their UI.
Enforce library grants across browsing, search, collections, person credits, metadata, artwork, subtitles, playback, and progress. An item from an inaccessible library returns 404 and cannot appear indirectly through global search or a shared collection. Empty library access lists continue to allow all signed-in users.
Restrict playback sessions to their owner, reject tokens for deleted accounts, and serialize first-user creation to prevent two unauthenticated setup requests from creating administrators. Authenticate native browser media through an HttpOnly, SameSite=Strict cookie while keeping API requests bearer-authenticated. Clear protected browsing caches on sign-out/access denial and prevent caching private API responses.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
--no-default-features.npm --prefix crates/client-web test: 134 tests pass, including UI permissions, protected route loading, cache clearing, and access-denial behavior.npm --prefix crates/client-web run checkandnpm --prefix crates/client-web run build: pass.cargo clippy -p koko --locked --no-default-features -- -D warnings: production targets pass.cargo +nightly fmt --all -- --checkandgit diff --check: pass.Default Rust features were not exercised locally. Expanded test-target Clippy still reports the existing
await_holding_lockandneedless_updatewarnings.Type of Change
Checklist
AI Usage
See our AI usage policy.