Commit graph

11 commits

Author SHA1 Message Date
Zach
3de0dedfd9
Merge 464b720d9e into 47ea6b5092 2026-05-05 17:56:42 -06:00
advplyr
5b2a788cfc Update LibraryItemController test with 403 tests
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Build and Push Docker Image / build (push) Waiting to run
Integration Test / build and test (push) Waiting to run
Run Unit Tests / Run Unit Tests (push) Waiting to run
2026-04-21 17:13:52 -05:00
zriddle
464b720d9e Add canStream user permission to control streaming access
Adds a per-user "Can Stream" permission mirroring the existing "Can Download"
pattern. Server admins can now disable streaming for specific users, encouraging
local downloads instead. Addresses #2572.

Changes:
- User model: stream permission in mapping, defaults, and getter
- ApiKey model: stream permission in defaults
- Controller: 403 enforcement on playback session creation endpoints
- Frontend: permission toggle in admin UI, play button gated by canStream,
  download button shown when streaming disabled, message when neither allowed
- Tests: 11 Mocha tests (model + controller), 1 Cypress test (card UI)
- Localization: English strings for toggle label and fallback message

The getter uses !== false (rather than !!) so existing users without the
stream key in their permissions JSON default to allowed on upgrade.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 14:12:08 -06:00
advplyr
2f2d026b06 Auto format 2026-03-08 17:25:52 -05:00
Matt Andreko
e5af2f336b
Move file to correct folder... 2026-02-15 22:06:20 -05:00
advplyr
691f291843 Update LibraryItemController unit test
Some checks are pending
Run Component Tests / Run Component Tests (push) Waiting to run
Integration Test / build and test (push) Waiting to run
Run Unit Tests / Run Unit Tests (push) Waiting to run
2025-07-07 16:26:17 -05:00
advplyr
ac159bea72 Update unit test stub function 2025-01-05 12:12:20 -06:00
advplyr
5cd14108f9 Remove req.oldLibraryItem usage 2025-01-02 15:54:10 -06:00
advplyr
eb853d9f09 Fix LibraryItemController unit test 2025-01-02 15:51:21 -06:00
advplyr
302b651e7b Fix library item unit test 2024-12-15 12:38:50 -06:00
advplyr
2b5484243b Add LibraryItemController test for delete/batchDelete/updateMedia endpoint functions to correctly remove authors & series with no books 2024-12-01 12:44:21 -06:00