Commit graph

11 commits

Author SHA1 Message Date
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
4102ed8be4 Fix LazySeriesCard component test
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Run Component Tests / Run Component Tests (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
2025-07-07 16:49:20 -05:00
advplyr
f853cff920 Fix LazyBookCard test with new globals getter for placeholder url
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Run Component Tests / Run Component Tests (push) Has been cancelled
Build and Push Docker Image / build (push) Has been cancelled
Integration Test / build and test (push) Has been cancelled
Run Unit Tests / Run Unit Tests (push) Has been cancelled
2025-03-28 17:42:41 -05:00
mikiher
b18da959db Fix broken component tests 2025-03-23 20:40:58 +02:00
mikiher
6820d9ae4e Fix AuthorCard component test 2024-10-06 18:57:13 +03:00
mikiher
54f2bb1092 Add a Show Subtitles option 2024-07-04 20:35:58 +03:00
mikiher
635f22ddfe Reverted default spacing and font-sizing changes, and extended spaing with em-based variants 2024-06-23 19:15:39 +03:00
mikiher
2186603039 Major bookshelf refactor 2024-06-03 09:04:03 +03:00
mikiher
b244cc8d41 Add LazyBookCard tests 2024-05-10 12:43:33 +03:00
mikiher
057bc1a0c0 Fix series progress to show sum of series book progresses 2024-05-09 07:31:00 +03:00
mikiher
2eb19d46d5 Move test files to a separate directory 2024-04-30 11:30:00 +03:00